From patchwork Wed Dec 5 12:28:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10714007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51F7714E2 for ; Wed, 5 Dec 2018 12:30:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 417202C78C for ; Wed, 5 Dec 2018 12:30:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 351E62CC55; Wed, 5 Dec 2018 12:30:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B36A62CAFA for ; Wed, 5 Dec 2018 12:30:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DE4726B744F; Wed, 5 Dec 2018 07:29:59 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DB8CF6B7450; Wed, 5 Dec 2018 07:29:59 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CCF9A6B7451; Wed, 5 Dec 2018 07:29:59 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by kanga.kvack.org (Postfix) with ESMTP id A2F246B744F for ; Wed, 5 Dec 2018 07:29:59 -0500 (EST) Received: by mail-qt1-f197.google.com with SMTP id d35so20586561qtd.20 for ; Wed, 05 Dec 2018 04:29:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=5f1RX8PgtIxd6340o2+u9UfUNpwJ2JR8T6eBwDHn5iE=; b=agdsxzreDS+9Ajj1cNBP89npTOtBIHWTzYlV99FdLZ7icAb4h5zrRZ3NaDFwi1ME34 TohGolsEQQ0kqxa0mX2wtB6U1KN/1N2vR81uMdjZEf/npzFDTkFngu/+C7Gq9eYH1HdY OWsgOoamSEbd7DSUlPjxVW1FTIkEAg5qT6e8dnhDROQpbQzD3DXQts3vl1BEXKWaQHh4 YcdXp6+gl8yArAmvjS4VJA1O0QSoLBIm+9szk8KCqfEYB3S52XNtULqKmyEp9iOpm+Ch mV5wxhco0jy9/5ZznQ1+kCWaDUdhYg3i+9WFtxtOoCGu9aevOX1vQ+15LxWdpULNOFaC D9Rw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWaZxjwICnTl4KNB/0RgbB6+7g4Bfpp4IzCW8nnSG6kub8RIDjKx hsx8MinHzBSgKQfQJ/MWYhbZXUtkkniYGGsZicWWdg81w1mbuOHKQLg59stHnKQGbic/RDnubmG te7mrPx0pltmAe22yYSxVMsh3ExjP4xEJMp8MAT80uM7z+lprRMl5vIbJFa70dyFnsg== X-Received: by 2002:a37:7e86:: with SMTP id z128mr21370687qkc.20.1544012999413; Wed, 05 Dec 2018 04:29:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/X4n1uQjj68PLNErRL9fT5oJng8nt2KfY0DbwAPke0VJsa+Ga2HKkEmMZlFsNErAdpn4DvD X-Received: by 2002:a37:7e86:: with SMTP id z128mr21370659qkc.20.1544012998887; Wed, 05 Dec 2018 04:29:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544012998; cv=none; d=google.com; s=arc-20160816; b=Qhv5B91ArhkkjGxi1coKoaTUNGH49u2Uu/fDLkNOVlE3Lyn2rH++S8JNNc7G3HmweO 4LAMPGx1fWBc8fpvmiTZNbGXu8aIiT7Dw90PgtokAOHdwKtnHHZTXnsU1v8pA6SFvGpz nsSp6P/B0SnaGpC+p+lPVOv0qpJ6wP2amlgBeo6yXJbTyLN3kgHjaifRDwokVAJ4NFds tjGLtZjjz3of8oR3VhTbZenfkr7at1czhM5uelldhPGkQ/+fXx+DiOsiBP9yRwD5+N5q WFd6XjRrE9X9GWsOLgiCrR5kXCUjY3pFOk645/LsmK+vAx11ezuIAvz7sq8ktWFYpEOY WTBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=5f1RX8PgtIxd6340o2+u9UfUNpwJ2JR8T6eBwDHn5iE=; b=rA+q65HyRWff5xWzKnJ61H7dxntddPCCyVjl+pBnw3O+qXNXs5yyzHiYen8ZtF/Igd sxX8Vuy2SYWAiLxQzlCcdraLg4Q6ok7T4SQ4d0FA+nbIJlHmEwpafRpGQBbFE15QX38A zbyxU5/9VaA12erWrPsvdn8KfK+e5CrWQk1DaMg8r/GR3o6yemEeWkZi9YJ8Z5kSQFTA Y5FWjA4AV146Zyc68KA61EKyWyu5FHol2hkM5lTz5kHQI1f0JQb4DO6pvg3R8URKb6Da VCyvasaiVZ+x9FQi/UchXtAGp61GcvnjZuoZPfc5TrcU1igl5XMw8AiHw/G0yHuZs0DX yeVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id i21si11088199qtp.305.2018.12.05.04.29.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 04:29:58 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F33E2307EAA1; Wed, 5 Dec 2018 12:29:57 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-65.ams2.redhat.com [10.36.117.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id C4DF582789; Wed, 5 Dec 2018 12:29:11 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, David Hildenbrand , David Airlie , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Michal Hocko , Matthew Wilcox Subject: [PATCH RFC 1/7] agp: efficeon: no need to set PG_reserved on GATT tables Date: Wed, 5 Dec 2018 13:28:45 +0100 Message-Id: <20181205122851.5891-2-david@redhat.com> In-Reply-To: <20181205122851.5891-1-david@redhat.com> References: <20181205122851.5891-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 05 Dec 2018 12:29:58 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The l1 GATT page table is kept in a special on-chip page with 64 entries. We allocate the l2 page table pages via get_zeroed_page() and enter them into the table. These l2 pages are modified accordingly when inserting/removing memory via efficeon_insert_memory and efficeon_remove_memory. Apart from that, these pages are not exposed or ioremap'ed. We can stop setting them reserved (propably copied from generic code). Cc: David Airlie Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Andrew Morton Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: David Hildenbrand --- drivers/char/agp/efficeon-agp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index 7f88490b5479..c53f0f9ef5b0 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c @@ -163,7 +163,6 @@ static int efficeon_free_gatt_table(struct agp_bridge_data *bridge) unsigned long page = efficeon_private.l1_table[index]; if (page) { efficeon_private.l1_table[index] = 0; - ClearPageReserved(virt_to_page((char *)page)); free_page(page); freed++; } @@ -219,7 +218,6 @@ static int efficeon_create_gatt_table(struct agp_bridge_data *bridge) efficeon_free_gatt_table(agp_bridge); return -ENOMEM; } - SetPageReserved(virt_to_page((char *)page)); for (offset = 0; offset < PAGE_SIZE; offset += clflush_chunk) clflush((char *)page+offset); From patchwork Wed Dec 5 12:28:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10714009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B2CB17D5 for ; Wed, 5 Dec 2018 12:30:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EFB2A2CC8A for ; Wed, 5 Dec 2018 12:30:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E16DA2CE95; Wed, 5 Dec 2018 12:30:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BCCC42CC8A for ; Wed, 5 Dec 2018 12:30:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D94746B7451; Wed, 5 Dec 2018 07:30:05 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D6AFF6B7452; Wed, 5 Dec 2018 07:30:05 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C816C6B7453; Wed, 5 Dec 2018 07:30:05 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by kanga.kvack.org (Postfix) with ESMTP id 9E1A06B7451 for ; Wed, 5 Dec 2018 07:30:05 -0500 (EST) Received: by mail-qk1-f200.google.com with SMTP id v64so19974031qka.5 for ; Wed, 05 Dec 2018 04:30:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=wrnTpcztdhkLOx5UlBaal7BO9LpZw/dFswadfw8ZOZI=; b=NwL1ivb2nMNqLA9bhcZtFa3aDWgtgNPIJ0YHPS8+CeL98SfAIb54oZdiAhgJKl/aYf ZPpr3XMY8h5+0PE96Bcr+B9qwPFGy6hZEt29bJxhViCqiX3n7bQyzAqQD++jZGxsHC66 rjITOLORJGeOr3l/nF4FWHDQkw1Mwc//+oXC6YUGNx2aXx9+zN9giqMuu5g/sxQ5MTlW cdx79fnpvJXMKV9ZCazbz59WZS+3EcYjGrnbJt2A3j1cdSvv/Sa8kAH2plWqkGZeqPtY 6bKyxNCfqHGXk4V8qJbVYyTgCdLFmaf0w/zKKICrXx+w9fZDJdWssjEkhzcgjJyLVT4l Np2Q== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWbz0Ci1SEDjjsluCuIoTEikslOVlzP5uguo8rkSElgqLpQDsaEm 7OLVGfi63wXyU6rJQSlD2LBUNPuGZ0vpZJhc2aVQ/lckVoP9Dl1ZDjRx7KAtbVbAm2/wcV1JV/G FaPDofgs1G+KGlykDs1kNuc+G6rMHriN0yEY1D2GsSjWnfiubGQ3BWzvuSobdRvfxNw== X-Received: by 2002:ac8:2281:: with SMTP id f1mr23050351qta.197.1544013005425; Wed, 05 Dec 2018 04:30:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/V15jNDgv6mNvyR0dLt2RjcoMw1AhRrCDSeikxW6me34Mi/4oSC0RH2TdKdg2C7zTDpkhIT X-Received: by 2002:ac8:2281:: with SMTP id f1mr23050296qta.197.1544013004507; Wed, 05 Dec 2018 04:30:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544013004; cv=none; d=google.com; s=arc-20160816; b=Nr6yeZfGklQoyFMFStqwuB2dOPnIAtP87b16IEzDbc08iKUVTrNR2ooOi3YuFSQ/sD 0xi/8RCOASbJE5MA60q/xcCn9uS7b476KNTG/u4MYHI3DO1psq+1EMEXkN7UJUY+2B3J 9lg0vUURUhTEL/CwHzTCoqIzq/cV07l8mA2xFgBk4oYlTLv5gwRd/s0L/6FT0iQ1j9un 2KAofZsdX1Cqo5027JxaceNIPIAsjyMAVVg0MY7US4Kzx1tSlV+i6Ev24tfukag1eVDr sjWOxpppqhej6735Mh5xHbfE0uBnv9SVp2CYj9dnElfpAvDJG/E2ofjpTTvZUgOAKHcC 9yWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=wrnTpcztdhkLOx5UlBaal7BO9LpZw/dFswadfw8ZOZI=; b=ke2v/bv8AHDCo37a3u4DH7rM/6rum08KCiUfF/3L3iIN0cvo5z7whEJsqDSH2Dn9aC 9wSN1qLq+G6CtJ9VLPFIkw/ZVYg+ry57z7vp+YOQixCoDdznO119sO4RFtIHtGsdr5I7 7dxnJPNb3ElAyXoQ3XqH2i2xkHs0pmNcYhmHDuaQYK4P1WgxFVt8mVhMJjnevJrzpa8h FlU6g9d529rKjrriu54zgWmb9gESPJMjzG0Zfoo9dfgL9JRI96GdQJCX54HghCksVPqm VMah5pPStNLUC+pE15MA4nAhcsGV1uf9txmfeD06df3MaVJiQehnSwSWWx0izLyL16xx kmHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id 34si15337127qvq.116.2018.12.05.04.30.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 04:30:04 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 22EA3C05D407; Wed, 5 Dec 2018 12:30:03 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-65.ams2.redhat.com [10.36.117.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 53002503E9; Wed, 5 Dec 2018 12:29:58 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, David Hildenbrand , Martin Schwidefsky , Heiko Carstens , Matthew Wilcox , Mike Rapoport , Michal Hocko , Vasily Gorbik , Kees Cook , Souptick Joarder , Andrew Morton , Michal Hocko Subject: [PATCH RFC 2/7] s390/vdso: don't clear PG_reserved Date: Wed, 5 Dec 2018 13:28:46 +0100 Message-Id: <20181205122851.5891-3-david@redhat.com> In-Reply-To: <20181205122851.5891-1-david@redhat.com> References: <20181205122851.5891-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 05 Dec 2018 12:30:03 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The VDSO is part of the kernel image and therefore the struct pages are marked as reserved during boot. As we install a special mapping, the actual struct pages will never be exposed to MM via the page tables. We can therefore leave the pages marked as reserved. Suggested-by: Martin Schwidefsky Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Matthew Wilcox Cc: Mike Rapoport Cc: Michal Hocko Cc: Vasily Gorbik Cc: Kees Cook Cc: Souptick Joarder Cc: Andrew Morton Cc: Michal Hocko Signed-off-by: David Hildenbrand --- arch/s390/kernel/vdso.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index ebe748a9f472..9e24d23c26c0 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c @@ -292,7 +292,6 @@ static int __init vdso_init(void) BUG_ON(vdso32_pagelist == NULL); for (i = 0; i < vdso32_pages - 1; i++) { struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE); - ClearPageReserved(pg); get_page(pg); vdso32_pagelist[i] = pg; } @@ -310,7 +309,6 @@ static int __init vdso_init(void) BUG_ON(vdso64_pagelist == NULL); for (i = 0; i < vdso64_pages - 1; i++) { struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE); - ClearPageReserved(pg); get_page(pg); vdso64_pagelist[i] = pg; } From patchwork Wed Dec 5 12:28:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10714011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D7D417D5 for ; Wed, 5 Dec 2018 12:30:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C8D52CC55 for ; Wed, 5 Dec 2018 12:30:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70DA42CE94; Wed, 5 Dec 2018 12:30:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4C052CC55 for ; Wed, 5 Dec 2018 12:30:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B9486B7452; Wed, 5 Dec 2018 07:30:08 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6670D6B7453; Wed, 5 Dec 2018 07:30:08 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 57F486B7454; Wed, 5 Dec 2018 07:30:08 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by kanga.kvack.org (Postfix) with ESMTP id 2B7606B7452 for ; Wed, 5 Dec 2018 07:30:08 -0500 (EST) Received: by mail-qk1-f200.google.com with SMTP id h68so19975903qke.3 for ; Wed, 05 Dec 2018 04:30:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=AHOZQxBkJ1h5ptlXCEr+F06XJiW9l91fFbVwclEPXpI=; b=XanKqjcsIJWTNGqwhR9qIw4sa//Jub+lfjyJtb7q6HkQeCcCoTpvbpyE/niwuP8AGr eQRyef5FTPO9maeFCJa0TKGLGWEttWDPpNM7YgzW3u1NNC8+ucmTGEUjG/2ilYbwu41F ll1LbPzn2+ImuYu1iudBhhbqCFRegz2+HYMGGNxZh++hnjUhP28yN4qRTWCAb/55VCZs 9oG3bsVkP0C0siBDkHc4ZhrYXdV1kcgcFuHAS7CGo9N04Pcx0MRs2VFUzoHDz2O4HCeW ktzNBhwsIkmLKiId1f08PZOweU4g3QO3dHS2MwTuk0tVj9j8uxUpUbTSqt8z3D8PoL5A FrQQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWbb8HENQc4A6h+YqVmxVVRNH+nXmklRhorI21Fbtg+LJIvYNGWB vjFOc9VIYOOfGSx82miTT2bXiJE1ui+g1GBMrd82Pf0UHIyG6qhFNuauVmWrcf3pwaQTm0cbvzB FnscHMDXuXUGg01/3A0P0ZI9myp1qspkAxMyl38Aa2RRDE/2MQ5IZft7upD9LMOtY+g== X-Received: by 2002:a0c:884d:: with SMTP id 13mr23646182qvm.170.1544013007933; Wed, 05 Dec 2018 04:30:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/XJqvk2ahgoQVaDH6QV71ZghqHehqSENAhb/0yfcd1vfhaddsneLe+SNj/cvkdwL8ZWvPCu X-Received: by 2002:a0c:884d:: with SMTP id 13mr23646131qvm.170.1544013007195; Wed, 05 Dec 2018 04:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544013007; cv=none; d=google.com; s=arc-20160816; b=KYOhN2kcZ5XaWJ1C+NYRxleH2nij+/xAlXi2cxK5N4aXQuC38wZywhBXbXC+avxd2/ I7dMoMxGClM7VFPtIO7RPftA25P17Yknqnc7Pu877JrkA0pDWQti/yqHNOvjfhNimUXQ OKtGxo1zo63FsnTG/iprqB29Iox+dpSCbs4Sigzhw2HEk7bkhDUSdUzt0aM15PZWp7Dy TCwW6rg7GwHJq575pq5IWU7VMP/DiZhiy/M8VQLvn6Xs8h2sXvvMUqqHrTjiAkd0nTi8 lu2uIWeQCJGtaGE17FTnF5Q0TFXvxpQT9btA86XxVhXFesjfTDV5K66AaPSTHW7zBX6x qvuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=AHOZQxBkJ1h5ptlXCEr+F06XJiW9l91fFbVwclEPXpI=; b=MO0guGuxASw2O7BRaXzDjhjqwTAOJMT0AdWWJlACzM5EmdxJZwCXj3saLGlDFvDku1 vbXKwFKGO8f1t0dLQWh/+io6txlaPLeY4Zw5CNyxBEMCcD9JeLoWUwPe/IymQ6yrfV6F KI2b1WdpE/Nb6hfQ9qVoXAFjgBMiIviUQkNNjZw1AlfO2i8PEzVAYR0haiCMtj8MyQZx tICS/VCLClLRBtd2vZz5T+YjN9PDx/fkRnC06yfIuDPiY8S4KmnpyWWny+qNpWjP3Af5 B9HZKr16uquRKLlW3WH7PLX30lA3CX+eKSjdx7ugVHOlUAPmdH3y7oKUVn//zLOOlVdi xYlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id f188si8213803qkb.226.2018.12.05.04.30.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 04:30:07 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3F19227D7; Wed, 5 Dec 2018 12:30:05 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-65.ams2.redhat.com [10.36.117.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82EBA842AD; Wed, 5 Dec 2018 12:30:02 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, David Hildenbrand , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Christophe Leroy , Kees Cook , Andrew Morton , Michal Hocko , Matthew Wilcox Subject: [PATCH RFC 3/7] powerpc/vdso: don't clear PG_reserved Date: Wed, 5 Dec 2018 13:28:47 +0100 Message-Id: <20181205122851.5891-4-david@redhat.com> In-Reply-To: <20181205122851.5891-1-david@redhat.com> References: <20181205122851.5891-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 05 Dec 2018 12:30:06 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The VDSO is part of the kernel image and therefore the struct pages are marked as reserved during boot. As we install a special mapping, the actual struct pages will never be exposed to MM via the page tables. We can therefore leave the pages marked as reserved. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Christophe Leroy Cc: Kees Cook Cc: Andrew Morton Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: David Hildenbrand --- arch/powerpc/kernel/vdso.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 65b3bdb99f0b..d59dc2e9a695 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c @@ -795,7 +795,6 @@ static int __init vdso_init(void) BUG_ON(vdso32_pagelist == NULL); for (i = 0; i < vdso32_pages; i++) { struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE); - ClearPageReserved(pg); get_page(pg); vdso32_pagelist[i] = pg; } @@ -809,7 +808,6 @@ static int __init vdso_init(void) BUG_ON(vdso64_pagelist == NULL); for (i = 0; i < vdso64_pages; i++) { struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE); - ClearPageReserved(pg); get_page(pg); vdso64_pagelist[i] = pg; } From patchwork Wed Dec 5 12:28:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10714013 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7AE2617D5 for ; Wed, 5 Dec 2018 12:30:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A7452CC62 for ; Wed, 5 Dec 2018 12:30:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E15F2CC55; Wed, 5 Dec 2018 12:30:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1EE52CC55 for ; Wed, 5 Dec 2018 12:30:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4216C6B7453; Wed, 5 Dec 2018 07:30:11 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3A8A66B7454; Wed, 5 Dec 2018 07:30:11 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 295D76B7455; Wed, 5 Dec 2018 07:30:11 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by kanga.kvack.org (Postfix) with ESMTP id 023CC6B7453 for ; Wed, 5 Dec 2018 07:30:11 -0500 (EST) Received: by mail-qt1-f200.google.com with SMTP id n39so20202128qtn.18 for ; Wed, 05 Dec 2018 04:30:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=J+re+fa5AMo/gj1ynZ9W9HgzOUN4cg3LMHdRqs1pSlQ=; b=DTBamE99eYOgGD001UpjILAwbjNigv1/UyszDkFe4XtDun2uxb9071jGpSfsEMoNjg j56K6qOubdnxmH139JZPTIM+LfNLo9wG4p8N2rE0AnXw0n0uPKSKLLPq/3BDLhC0Cu1B vfbVF0mg+cZDYx4iqFBoJ5MRih4fUFxNfI/u5Rkk3YRKQx2Ql9w3JKkBb4AFtiBXz9D4 KKSWg972Kl/1i1JJ6EfK1RIPku1HPvdeaafc1ySICXQerQ5XMGlaK8wFEIfKv78SXrn8 Opcfy2hilsngX3PgJm9HJ7y7VJnhQWDEjyOOoyxW8R4u7VQ0HL1+ySPZx9FgCmx+lvTL 7itw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWYIs+dPciS+WCzvhmVtoky2j7mWYTYxDpqpjGLtfDNLoXm7AfTs X9VRbjZX7iG3fWX3wCTUYQFDe1ACTdXfRtWwDrc3qk/CZoxp6olaetB+UDWSAbVv6sJjcf/MgQB GV3VvjdcUyX+t7MIs6Yxft/UO0ANHAdm0bB++T60GZzec/gtjhuB36VikjD3amxjwQQ== X-Received: by 2002:a37:7183:: with SMTP id m125mr21423765qkc.195.1544013010765; Wed, 05 Dec 2018 04:30:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wv+I2z9V93LSzACBpbibOWm1cX1AyDyniU6oyR0pJNxPNyYaRxujNcWiBeftGpFVDjOChH X-Received: by 2002:a37:7183:: with SMTP id m125mr21423743qkc.195.1544013010239; Wed, 05 Dec 2018 04:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544013010; cv=none; d=google.com; s=arc-20160816; b=ekAXIlsJBeV+QWUfon28z5SFmjZBE3Y1G9AelFm7+x87duOXbMVM0oIcxpP1KiCqwW 05mLY1b+1t6CdC3/xaLiYDZy9pGUqzCx4Q1tMiEn0oYPe3xhvq9kMviUoxfBGkbWEGsQ WxjWPI4ZLVC5Y0bZNOVWkeUb5w4HMtO2SH86pZlp75YuMqqYDtOq8cLz/l56E5v0f7P3 QngBdD0WqAWeEqLRJwn36wd4EBfNYi9pjW27ssbDwdNBxZK20CGISeZq32fqfQvKTx+L ncPnEXxsNSyZIfBL3gAr29JIm5TUozQSWgIXHPfNVG1wm0VRL6IM/pdy8+GB1NWkZBap FwXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=J+re+fa5AMo/gj1ynZ9W9HgzOUN4cg3LMHdRqs1pSlQ=; b=hjSOCa9TpqpfIaD9u9+seJ57mlJD84pYmxyunRWE0L92mEo+22TpMHVUCkMjjULkof 9WpgbWpEoWZilKHoomETNiT9PJ8ChhqsaSjJjAVO+fOH517ZLn+M5zFXAoC0RlS2Mlyl g6Y/mTQzV+6f3/ljOMJyRGOqqGah8+gIK0aOM/87IkxMoXCDvJJwSGB4LuQVDNL+UV28 NSQq9ONYN17u7RO3B4rMgoXCbWQWUoT4THl4USvONRPzasy6UFCqtny4YYWg5GiiJfrs W1oVSG5unCx9J4lwWfTK3QRdtS+VjStb3sLc9OJdA//1n9V4ZHzYZaYx78fQxmhmq4qW ha1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id d7si4379030qtj.266.2018.12.05.04.30.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 04:30:10 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 308583002315; Wed, 5 Dec 2018 12:30:09 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-65.ams2.redhat.com [10.36.117.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4AA5C60F89; Wed, 5 Dec 2018 12:30:06 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, David Hildenbrand , Palmer Dabbelt , Albert Ou , Tobias Klauser , Andrew Morton , Michal Hocko , Matthew Wilcox Subject: [PATCH RFC 4/7] riscv/vdso: don't clear PG_reserved Date: Wed, 5 Dec 2018 13:28:48 +0100 Message-Id: <20181205122851.5891-5-david@redhat.com> In-Reply-To: <20181205122851.5891-1-david@redhat.com> References: <20181205122851.5891-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 05 Dec 2018 12:30:09 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The VDSO is part of the kernel image and therefore the struct pages are marked as reserved during boot. As we install a special mapping, the actual struct pages will never be exposed to MM via the page tables. We can therefore leave the pages marked as reserved. Cc: Palmer Dabbelt Cc: Albert Ou Cc: Tobias Klauser Cc: Andrew Morton Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: David Hildenbrand Acked-by: Palmer Dabbelt --- arch/riscv/kernel/vdso.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/kernel/vdso.c b/arch/riscv/kernel/vdso.c index 582cb153eb24..0cd044122234 100644 --- a/arch/riscv/kernel/vdso.c +++ b/arch/riscv/kernel/vdso.c @@ -54,7 +54,6 @@ static int __init vdso_init(void) struct page *pg; pg = virt_to_page(vdso_start + (i << PAGE_SHIFT)); - ClearPageReserved(pg); vdso_pagelist[i] = pg; } vdso_pagelist[i] = virt_to_page(vdso_data); From patchwork Wed Dec 5 12:28:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10714015 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96C0317D5 for ; Wed, 5 Dec 2018 12:30:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 854B72CC55 for ; Wed, 5 Dec 2018 12:30:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7904C2CC8A; Wed, 5 Dec 2018 12:30:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04ACC2CC55 for ; Wed, 5 Dec 2018 12:30:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF8D96B7454; Wed, 5 Dec 2018 07:30:13 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E7C2B6B7455; Wed, 5 Dec 2018 07:30:13 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D99906B7456; Wed, 5 Dec 2018 07:30:13 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by kanga.kvack.org (Postfix) with ESMTP id AE15D6B7454 for ; Wed, 5 Dec 2018 07:30:13 -0500 (EST) Received: by mail-qk1-f200.google.com with SMTP id z126so19789217qka.10 for ; Wed, 05 Dec 2018 04:30:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=uu9Bv6QSbxHHwnbPMecYXxLOyjHYWGYtAnb0Wv3n30o=; b=HaKdaAw9qacZ6gq5KN4T+kAWm3+/Vr3xKyjd7/eBi/KEjCw5RZraa+bv4CIjf41GSn PTsOzfl9BvpAh9BMmzVLXGWgWIXQrFHAJ2MksR59aIHIoQW+LvERNdnpnio7Zy/KiCZU deBcOZTlttcluOAR8VI2p+zB8Udu4BifPOCUk4KFnMrRQdXRWnHsYsMXV8Qf1DnEY/yL rbwpdBCRRnkAJj7OVziYdENjXodkGiBf76nSyt/5vx5PGUjE/ygAc8rK5Gv8K5LDP89I EZQdZkAw7SGK1rGfe12NFp+yg4+K30dFKAP1sf6pYgoELbCukJj1/2nVfHEPqOhFRDzv vRcA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWYLWyknSstTHWAtt7zk3fyDcQKy/ZPIhGBz7kVry+FekJYDeK3G ngHrW6ibrxBSQcilopeDqzYoglr24vlxaXphg6usICUIG/PXeH9ZWv38xy7VZvaqbqA4avpz7/z OGkx9NC1hNz/ril5WdBHUfzVclB4zHWvvro1DCHdZ7W0wgplw4t+SYxt4s4ryOUaeVg== X-Received: by 2002:a37:3a04:: with SMTP id h4mr21302759qka.53.1544013013457; Wed, 05 Dec 2018 04:30:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/XS5XgDg2FcIlrr09kFovZKLx0Fe34q6IIiULoYgUvGT+5VzEjKxeiGKiUyYxrjkLXFOWXB X-Received: by 2002:a37:3a04:: with SMTP id h4mr21302727qka.53.1544013012970; Wed, 05 Dec 2018 04:30:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544013012; cv=none; d=google.com; s=arc-20160816; b=ciws0MOYSeoxi17wDUPgOYcitjcLSjmWXZQctW1P11uyeAuRWc2zjsHSSywbNhyl80 uct/Vm62n+4SOPcg8cBWsA8tdLYzf8ex/Yd1WboBNl7A5uv4aFJsuwNMi8DFoMoXe0Sq F9t0QxSYosd9xNYT1YpGk440HWIk13RK8DL9+dUJonFD8xj0YonY/9KfByICCSdU8ywA Efod+zWnUhd9MmvWXJEQkUmlCLbCTZYq1OkMauR+1XvNqiCM+WWxvqqqUlTXZL886HRk wuVFynaPzLAe6AV7sqNPPyeeoIcuHTZqx07beyRf7/BwU+qO0izeI/WgjeHwzEvd7u8u Oj8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=uu9Bv6QSbxHHwnbPMecYXxLOyjHYWGYtAnb0Wv3n30o=; b=TlMQ9l/bviXt/Trp9do7UbnnycehE0ArV+4VbY75lOCW4vW0EmCrNnMiJ7q8h5E88k zBENAWKEgL9NlVxcrt6I8KFXmWIw9UG3pVZjLNobpE/7HgFyqFB+Hd4JJiQYcfWh+cXQ lAOYXCVBfePIFAOq3EURjx70ehRdCd3k+K+6jJwjyEWI+fj9AhO9CFNgAu37rGBhW/xz MMzInH64K4bb0AzEBfGQQFcSidd3DDuju5yWN5LjTemWtudHZYwVP6BA4Ljr+Vc4w91P wunTX7gbfJrDqqx5A5SqCEzce6fk1r2KDf4WGiL4ADen8ay/k0wQ29lDM/flbkr3cJQx WDCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id b5si4950710qtg.383.2018.12.05.04.30.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 04:30:12 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0A5C130001F0; Wed, 5 Dec 2018 12:30:12 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-65.ams2.redhat.com [10.36.117.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 84C3260E3F; Wed, 5 Dec 2018 12:30:09 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, David Hildenbrand , Geert Uytterhoeven , Andrew Morton , Michal Hocko , Matthew Wilcox Subject: [PATCH RFC 5/7] m68k/mm: use __ClearPageReserved() Date: Wed, 5 Dec 2018 13:28:49 +0100 Message-Id: <20181205122851.5891-6-david@redhat.com> In-Reply-To: <20181205122851.5891-1-david@redhat.com> References: <20181205122851.5891-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 05 Dec 2018 12:30:12 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The PG_reserved flag is cleared from memory that is part of the kernel image (and therefore marked as PG_reserved). Avoid using PG_reserved directly. Cc: Geert Uytterhoeven Cc: Andrew Morton Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: David Hildenbrand --- arch/m68k/mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index b86a2e21693b..227c04fe60d2 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c @@ -51,7 +51,7 @@ void __init init_pointer_table(unsigned long ptable) pr_debug("init_pointer_table: %lx, %x\n", ptable, PD_MARKBITS(dp)); /* unreserve the page so it's possible to free that page */ - PD_PAGE(dp)->flags &= ~(1 << PG_reserved); + __ClearPageReserved(PD_PAGE(dp)); init_page_count(PD_PAGE(dp)); return; From patchwork Wed Dec 5 12:28:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10714019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B4EE21731 for ; Wed, 5 Dec 2018 12:30:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A58682CC55 for ; Wed, 5 Dec 2018 12:30:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 996992CC8A; Wed, 5 Dec 2018 12:30:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3911F2CC55 for ; Wed, 5 Dec 2018 12:30:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5CB386B7455; Wed, 5 Dec 2018 07:30:18 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 5A48F6B7456; Wed, 5 Dec 2018 07:30:18 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4915F6B7457; Wed, 5 Dec 2018 07:30:18 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by kanga.kvack.org (Postfix) with ESMTP id 224286B7455 for ; Wed, 5 Dec 2018 07:30:18 -0500 (EST) Received: by mail-qt1-f200.google.com with SMTP id u20so20473722qtk.6 for ; Wed, 05 Dec 2018 04:30:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=bBX054w8bGTdlesbgYGn0SoNh+EN7oi10ZQ+/mUCeAY=; b=slrJPw0j9T8egoBZJVAZ/E4XQF0mXcT1vsej5kB69RgEaSuXb4ZsD4w322nFqVo9Te pvy/0rLrwE7hkO+7nJPleW9Katsbh0I/iM6nt0YR2a6yYsEre/0Vnl+FVfzpf4josSI7 wVeS/l7hTJyWoRN3J4OppzsF1s4pIiZvWHpaLOijNHoU+9f2q7SPQav5olJ/vwrPtsuL 76yspSI2bC5SpaIv0apaBrldlZ8JCbSah4rjDmCp30unxv40aCQ/rIN6XGi7LahOjXRT sz7coSso5Op+Wz/GdfCVkViPB2mVTapBN5V7ZsXlDdm3wefsMYOAx0RolYY5u0FRgHog m6MQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWZvl+DfLk0KpHMRASA8MbNw3n1pzEU0GQDCZUXt5BIYw6vPfzxB 1SVl3QzAkvZ3JCyHMWA6Ft3oY/OXVa12WZ6/H9eMb48wG9VLtu8ePxllcYgF1RN8m1iA++/aFSF WCLMxoMEqUZmzRTM78RobS7rMMhzTqs7HQYH62JhZaSzCWCKq0G/jw2e2P5PLvDUbmg== X-Received: by 2002:ac8:2881:: with SMTP id i1mr23972864qti.382.1544013017934; Wed, 05 Dec 2018 04:30:17 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xn1dMjQ5aHkJJqTuRhYMH9hnwsCHqMB2JLqM/CXmT1up/b38yanPncVhwfimuciSVHrfTE X-Received: by 2002:ac8:2881:: with SMTP id i1mr23972820qti.382.1544013017303; Wed, 05 Dec 2018 04:30:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544013017; cv=none; d=google.com; s=arc-20160816; b=ZdppDJcW8e3Xc6eHvM072MS3KtPyLVfLQx9Lk/jqj8KofR31hfpyGe3defZYdvALeO eEc5Ug+0eL2UbcV1q18rQ2I5LcI49Yc0EiHKt+WmnIuSw2119GD3qPe1V51evRbqkCWG 0hn1TPqhIvtTV7HJvRe2Ys1eAppG5v/kBHjhaOU8UH3NodeqrlCptEHEwg9RQYGgAE4w 7mp/0UvTgnbBwKBi96mPWZRVHl3ZGav2UVXN+LTvF00p7Hl4vEmp4gMzBclDVxFd6FXp QXFrFmWlHqnfGnbBiRXPcVLo7qfdDxrCn2PxSrh0ypvg3poZ2LvDQxLFOjExo126kqwo gaFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=bBX054w8bGTdlesbgYGn0SoNh+EN7oi10ZQ+/mUCeAY=; b=1KLi+V8q6U+8zVyU1wo5xSDrI8CjRpgBcQ9f8b+3EOBo7HRpdIcSMKlbItl6pWlTWb ra04aIVjr0Y8+JZhQ5ky3svFsukGl11LXy/x2AKFf6c5kILN6h/FGQmcf8l7vHhh4FSE MPXcUGS+3QA7944DlQ/dwIYVBufAhZWjzyqd/MXYbA/kLtIFj3uyYZvWJ4NNkeLTelTx WIoNy2rLzZxM0XikK2rsPMs4aLWgfGw2Qg37AnOMSEp1TgFyop4ep8i4wzsrR7fE7/yr LiDCoEsz+9kscSG4UswD0YWyme012uUg7CFgVFx9bwOH/xKDKRme8xULpWfW95L0rY7C c86A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id g89si7817641qtd.118.2018.12.05.04.30.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 04:30:17 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE2E430001EF; Wed, 5 Dec 2018 12:30:15 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-65.ams2.redhat.com [10.36.117.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 658DB60E3F; Wed, 5 Dec 2018 12:30:12 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, David Hildenbrand , Catalin Marinas , Will Deacon , Bhupesh Sharma , James Morse , Marc Zyngier , Dave Kleikamp , Mark Rutland , Andrew Morton , Michal Hocko , Matthew Wilcox Subject: [PATCH RFC 6/7] arm64: kexec: no need to ClearPageReserved() Date: Wed, 5 Dec 2018 13:28:50 +0100 Message-Id: <20181205122851.5891-7-david@redhat.com> In-Reply-To: <20181205122851.5891-1-david@redhat.com> References: <20181205122851.5891-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 05 Dec 2018 12:30:16 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP This will already be done by free_reserved_page(). Cc: Catalin Marinas Cc: Will Deacon Cc: Bhupesh Sharma Cc: James Morse Cc: Marc Zyngier Cc: Dave Kleikamp Cc: Mark Rutland Cc: Andrew Morton Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: David Hildenbrand Acked-by: James Morse --- arch/arm64/kernel/machine_kexec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index 922add8adb74..0ef4ea73aa54 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -353,7 +353,6 @@ void crash_free_reserved_phys_range(unsigned long begin, unsigned long end) for (addr = begin; addr < end; addr += PAGE_SIZE) { page = phys_to_page(addr); - ClearPageReserved(page); free_reserved_page(page); } } From patchwork Wed Dec 5 12:28:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10714021 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5391D1731 for ; Wed, 5 Dec 2018 12:30:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 444B62CC55 for ; Wed, 5 Dec 2018 12:30:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37B112CE95; Wed, 5 Dec 2018 12:30:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C5FF2CC55 for ; Wed, 5 Dec 2018 12:30:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 644E26B744D; Wed, 5 Dec 2018 07:30:22 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6184F6B7456; Wed, 5 Dec 2018 07:30:22 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 507F16B7457; Wed, 5 Dec 2018 07:30:22 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by kanga.kvack.org (Postfix) with ESMTP id 218B86B744D for ; Wed, 5 Dec 2018 07:30:22 -0500 (EST) Received: by mail-qk1-f197.google.com with SMTP id n68so19567063qkn.8 for ; Wed, 05 Dec 2018 04:30:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=SR+GJnGNFZkXpFDzTNvr0cck4cT7IZAArtvDfgMQylU=; b=l4RswuTDa4n3L+dyd+fIiEBD8nJpSRONSBC+gyMSi/IqP91+148vhD/MMi/VuT7/kd 1ldm7gmR2cxIE4czcjgolsEU16Z3hmU/x7e3DxsxoyMW0s7iv7KWqfi3k+Htj+NF/++2 u14jOcmAgQoy3qV3kRFjXbbknISURPk8B58Bt4z1h2MNlQWi3+tDslBNa4x/000Dz2kj 9K2IZA0K+hkxoVO7OGvTlq6mcsdBAWrxPfk7TDnC7gypG4nfs1DAdXgQuYTkQatV3D0k eHCdQSoBhLHJfodzg0zipQfzMOiNsT4huOS19cpSXd5WfPND3GFzt4kGl1ciSwpVB1Bs O1QA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWbdIQuZyBEOk3elGLP+YTh6+sAPcoels3h9XT89eG5JmI+ACoQq MTkp21JjQp7y6pQDYmXD+lRn8sNh3b7pq5PMO3WmnchsglX8tH4VAdTz84UhXgGb8J+e73N4ir0 kFTU+ouk+44sdUnOJmw6a4qhH02v2KFIyWURYBCKyuUnNU+YP/HT0z3p+1/CHPtsNIA== X-Received: by 2002:aed:2044:: with SMTP id 62mr23113806qta.11.1544013021873; Wed, 05 Dec 2018 04:30:21 -0800 (PST) X-Google-Smtp-Source: AFSGD/V79OBzwm9Q0+1cskKfpXloTJm10LwiuNkROyZzC2VzDMk8BPnUZE9b2XbvtSjGFxu1B7Gy X-Received: by 2002:aed:2044:: with SMTP id 62mr23113751qta.11.1544013020949; Wed, 05 Dec 2018 04:30:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544013020; cv=none; d=google.com; s=arc-20160816; b=JUeXNOO3Qx57A3s9zseSvhJ+ilp0ISR8XcqR6qHkgf7s3cr3jR/Uxx4DVmkvD07MOx SXaSQ4wWVEUsxSWdxA6TpgXbB1SvUwb59Idd8XIp/rF3KD72qA/GHbj4Zu9p9FCFpoCF mX8/f7csvQx5twC1Hm0Qc4fcNb849DKhiVX+wkePcMRQJEQ9XLw4f7OfXKUbmeUnxMAU yuL43bP56HLsDjyfeFTuiU+WlIlZELjYLrbhChiw+CKQ9OqR60yomJCAoVjUR0Ba/Tx2 vxawdtwAM/PDs6a9yDfyxHseWgZeGf4GUV+sEg2ylPXrhjWgQi/O/Ux7pPhS9E8z6/OE tlyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=SR+GJnGNFZkXpFDzTNvr0cck4cT7IZAArtvDfgMQylU=; b=CJarmFpuPjrb95Qs0Ul/PI10CAA03Z5fktRyx9b6o5hkan2Ykk4s82NRb6IWSow+1I m+QAYgVUKN4e82yJEqX4vYJau6EGM957Rl7cLOSo+sD40v+Y+dhTVN8rdVbflqfJ7dij ilBDqCz8lYZJFD3WubHqVTkGHPVAGPh24P/tVuIcjzDUZZb3qT3Ul5xcmpkyyN/EToUF mKWZ8bi41xvciS/cgiyZ9P75RZjvtdP5ywuQWWffbxERCo2sUrxoz+AT2L4FZJVeFloX WDOybkI1fFABpE4xkKJivk/Y8BITf21YLhaKqnP4o4SjfmT6r6MOyyxfVnsrtnj2W4si N4lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id g34si404232qte.104.2018.12.05.04.30.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 04:30:20 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B69453078A25; Wed, 5 Dec 2018 12:30:19 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-65.ams2.redhat.com [10.36.117.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C16E183D2; Wed, 5 Dec 2018 12:30:16 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, David Hildenbrand , Andrew Morton , Stephen Rothwell , Pavel Tatashin , Michal Hocko , Alexander Duyck , Matthew Wilcox , Anthony Yznaga , Miles Chen , yi.z.zhang@linux.intel.com, Dan Williams Subject: [PATCH RFC 7/7] mm: better document PG_reserved Date: Wed, 5 Dec 2018 13:28:51 +0100 Message-Id: <20181205122851.5891-8-david@redhat.com> In-Reply-To: <20181205122851.5891-1-david@redhat.com> References: <20181205122851.5891-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 05 Dec 2018 12:30:20 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The usage of PG_reserved and how PG_reserved pages are to be treated is burried deep down in different parts of the kernel. Let's shine some light onto these details by documenting (most?) current users and expected behavior. I don't see a reason why we have to document "Some of them might not even exist". If there is a user, we should document it. E.g. for balloon drivers we now use PG_offline to indicate that a page might currently not be backed by memory in the hypervisor. And that is independent from PG_reserved. Cc: Andrew Morton Cc: Stephen Rothwell Cc: Pavel Tatashin Cc: Michal Hocko Cc: Alexander Duyck Cc: Matthew Wilcox Cc: Anthony Yznaga Cc: Miles Chen Cc: yi.z.zhang@linux.intel.com Cc: Dan Williams Signed-off-by: David Hildenbrand --- include/linux/page-flags.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index 68b8495e2fbc..112526f5ba61 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -17,8 +17,22 @@ /* * Various page->flags bits: * - * PG_reserved is set for special pages, which can never be swapped out. Some - * of them might not even exist... + * PG_reserved is set for special pages. The "struct page" of such a page + * should in general not be touched (e.g. set dirty) except by their owner. + * Pages marked as PG_reserved include: + * - Kernel image (including vDSO) and similar (e.g. BIOS, initrd) + * - Pages allocated early during boot (bootmem, memblock) + * - Zero pages + * - Pages that have been associated with a zone but are not available for + * the page allocator (e.g. excluded via online_page_callback()) + * - Pages to exclude from the hibernation image (e.g. loaded kexec images) + * - MMIO pages (communicate with a device, special caching strategy needed) + * - MCA pages on ia64 (pages with memory errors) + * - Device memory (e.g. PMEM, DAX, HMM) + * Some architectures don't allow to ioremap pages that are not marked + * PG_reserved (as they might be in use by somebody else who does not respect + * the caching strategy). Consequently, PG_reserved for a page mapped into + * user space can indicate the zero page, the vDSO, MMIO pages or device memory. * * The PG_private bitflag is set on pagecache pages if they contain filesystem * specific data (which is normally at page->private). It can be used by