From patchwork Fri Dec 14 11:10:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10730867 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 27F7891E for ; Fri, 14 Dec 2018 11:10:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 15CB32D3F0 for ; Fri, 14 Dec 2018 11:10:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 129C12D40B; Fri, 14 Dec 2018 11:10:47 +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 97EBA2D40A for ; Fri, 14 Dec 2018 11:10:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7BAC98E01CA; Fri, 14 Dec 2018 06:10:45 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 719708E01C5; Fri, 14 Dec 2018 06:10:45 -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 5E2318E01CA; Fri, 14 Dec 2018 06:10:45 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by kanga.kvack.org (Postfix) with ESMTP id 2F7838E01C5 for ; Fri, 14 Dec 2018 06:10:45 -0500 (EST) Received: by mail-qt1-f198.google.com with SMTP id 42so4541647qtr.7 for ; Fri, 14 Dec 2018 03:10:45 -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; bh=4yFDzqOlR1RYUKL/L8ANwPqnesDXF1b6QE/bQC++OcI=; b=YSEd+lt6FsrrNYJoBdjLXbx3v/SPYweJG0WfH10BYFI9W+LoBZy+ryX5nHV5Xu5mFx n/u2veT/6U52bI4LMbINAV0xJBNAjYvRlJsP7T5yO6xo3p/dgJk3MtRg0aTo4sy6Mbjf GwOqp7DRVQ4W4Hg2R1py/Xn634Ej4eCHVjrc7Iiv29brFp5vxfy2ESMrfSJ4A9QNCfCs szyzJsws+qxrPS1CgTy20pcbRDwYdEk27SGZrPvfzTBfIt927GXpi9FACCFPwySpHYgN u6JRJDXYQ7V5PY1HILjE+lLItIBEU/Imh3lcyxofSba62Ls5l/BFMg755z3FJPZ5rzYv bz+g== 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+aEWaOjYxkfhKLXLZHWF41DBhu6mpLe8JjC0e+79KLPq1FbKv+ktjs BbFn/SdDsBPis3vkzSNAKTvXQmIhpkkvC9jfwK+e1u3k8mha2I8Ok1Enn82tCRcxy3+r7n/2CjE LWrdkLNQYH1Pj4fQWjnpuLwHFbLTQhPfwhdQWQcaFF38nOyLD6NhhqYd0uv2WvdJX3g== X-Received: by 2002:a37:9e44:: with SMTP id h65mr2108930qke.300.1544785844898; Fri, 14 Dec 2018 03:10:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/WDNTWvJpoR5OB+ut2YhbXRkOQPe/vue4PBpCy/oPe4pTPNsVMmxLoJBUZ/t713oWV2jsWq X-Received: by 2002:a37:9e44:: with SMTP id h65mr2108889qke.300.1544785844192; Fri, 14 Dec 2018 03:10:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544785844; cv=none; d=google.com; s=arc-20160816; b=ZRCx0hymOb8y0Pe9rTUtoaYo6XFA65jGX3er8qDy+Z2lL2r1o93cBk5GoxCcesHzZU 4lOjT+kmxYRagmLTEfcl7PrlM7PmK95qJp9ric8ynxM5isx7ATPzTG3pr4XyJEC6PU9K bO4RKc72+Y6/IG+hsopo+al8URDV3WLppj4DgQWF6f9l6mra0mOP6/BVfWHA+SbN8ttl ko5iYAaWSzk61ebzUjkTxadHJcea6sY626Yl9D52wCLiqIK7gjsdRzcoF1S10D0qbD59 zc5TAPxYavm2u6rUKZcA9hAbz/A6Jl2/nhBI1nYI7MRptxKX3zTjWFx4EQn1Iqnnl9J3 jUzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=4yFDzqOlR1RYUKL/L8ANwPqnesDXF1b6QE/bQC++OcI=; b=Ov2Fb6v331+XTHDaeaY9qjWHqpngXya6GCrQXk5SHK2hGS+ko8GBzy1M7e/gigXBeM oRxxjHDnIrsHvALsi/iNYJbAJhN4B0Q+ld+rwmKkeGIsQIn2mjqKmMQtNlxIDK4rgrFR 0T1ydMVEfQ3EnjxzvNX1s+H8wipw/ohEFrvvc7Bjl+OBRHy6Cz7v1bRajLtOKc+Uxole aDIWxtNJCPpWsuZ0d4ACFjbgYJeMgj6H1DJ96AxkoHkcBTXiAcFHAT2EI2xIIWuHEFNu iVhdhrTPn1e3Y8jX3m7Ne3pmQgH65uhMCxcedWO7j28uCS0Fntc7r/1XmNbzbq+B0Bmf 7q2A== 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 x3si1874161qtd.345.2018.12.14.03.10.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 03:10:44 -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-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A15C746263; Fri, 14 Dec 2018 11:10:40 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-139.ams2.redhat.com [10.36.117.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B90A5DA2A; Fri, 14 Dec 2018 11:10:15 +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 , AKASHI Takahiro , Albert Ou , Alexander Duyck , Andrew Morton , Anthony Yznaga , Arnd Bergmann , Benjamin Herrenschmidt , Bhupesh Sharma , Catalin Marinas , CHANDAN VN , Christophe Leroy , Dan Williams , Dave Kleikamp , David Airlie , David Howells , Fenghua Yu , Florian Fainelli , Geert Uytterhoeven , Greg Hackmann , Greg Kroah-Hartman , Heiko Carstens , James Morse , Johannes Weiner , Kees Cook , Kristina Martsenko , Laura Abbott , Logan Gunthorpe , Marc Zyngier , Mark Rutland , Martin Schwidefsky , Matthew Wilcox , Michael Ellerman , Michal Hocko , Michal Hocko , Mike Rapoport , Miles Chen , Oleg Nesterov , Palmer Dabbelt , Paul Mackerras , Pavel Tatashin , Souptick Joarder , Stefan Agner , Stephen Rothwell , Tobias Klauser , Tony Luck , Vasily Gorbik , Will Deacon Subject: [PATCH v1 0/9] mm: PG_reserved cleanups and documentation Date: Fri, 14 Dec 2018 12:10:05 +0100 Message-Id: <20181214111014.15672-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 14 Dec 2018 11:10:43 +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 I was recently going over all users of PG_reserved. Short story: it is difficult and sometimes not really clear if setting/checking for PG_reserved is only a relict from the past. Easy to break things. I guess I know have a pretty good idea wh things are like that nowadays and how they evolved. I had way more cleanups in this series inititally, but some architectures take PG_reserved as a way to apply a different caching strategy (for MMIO pages). So I decided to only include the most obvious changes (that are less likely to break something). So the big chunk of manual SetPageReserved users are MMIO/DMA related things on device buffers. Most notably, for device memory we will hopefully soon stop setting PG_reserved. The the documentation has to be updated. RFC -> V1: - Add more details to "mm: better document PG_reserved" - Add "arm64: kdump: No need to mark crashkernel pages manually PG_reserved" - Add "ia64: perfmon: Don't mark buffer pages as PG_reserved" - Added ACKs David Hildenbrand (9): agp: efficeon: no need to set PG_reserved on GATT tables s390/vdso: don't clear PG_reserved powerpc/vdso: don't clear PG_reserved riscv/vdso: don't clear PG_reserved m68k/mm: use __ClearPageReserved() arm64: kexec: no need to ClearPageReserved() arm64: kdump: No need to mark crashkernel pages manually PG_reserved ia64: perfmon: Don't mark buffer pages as PG_reserved mm: better document PG_reserved arch/arm64/kernel/machine_kexec.c | 3 +- arch/arm64/mm/init.c | 27 -------------- arch/ia64/kernel/perfmon.c | 59 +++---------------------------- arch/m68k/mm/memory.c | 2 +- arch/powerpc/kernel/vdso.c | 2 -- arch/riscv/kernel/vdso.c | 1 - arch/s390/kernel/vdso.c | 2 -- drivers/char/agp/efficeon-agp.c | 2 -- include/linux/page-flags.h | 33 +++++++++++++++-- 9 files changed, 37 insertions(+), 94 deletions(-)