From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 976A1C83004 for ; Tue, 28 Apr 2020 21:41:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 63F8F20730 for ; Tue, 28 Apr 2020 21:41:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 63F8F20730 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CC5598E0006; Tue, 28 Apr 2020 17:41:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C75488E0001; Tue, 28 Apr 2020 17:41:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B8AE28E0006; Tue, 28 Apr 2020 17:41:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id 9DE948E0001 for ; Tue, 28 Apr 2020 17:41:12 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6637C181AEF09 for ; Tue, 28 Apr 2020 21:41:12 +0000 (UTC) X-FDA: 76758584784.20.rake94_a6cf740ac03b X-HE-Tag: rake94_a6cf740ac03b X-Filterd-Recvd-Size: 3080 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Apr 2020 21:41:11 +0000 (UTC) IronPort-SDR: M94W09g8G+9dopi3ot1K61uuGxSb16CQma0/PmtYY1d0lBT/1lzTGcj0qqWg0Y6XYd/dpyzLAV Zuknr0Xhju+w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2020 14:41:09 -0700 IronPort-SDR: BmShGtgPqO6g9l9TLnBaVqT0N7A8E9oYbKUmaq7A4M6HrJ//OEDzv4VauweuunA2PtV+nzwqSv a6P896ZIrZdQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,328,1583222400"; d="scan'208";a="247825303" Received: from iweiny-desk2.sc.intel.com ([10.3.52.147]) by fmsmga007.fm.intel.com with ESMTP; 28 Apr 2020 14:41:09 -0700 Date: Tue, 28 Apr 2020 14:41:09 -0700 From: Ira Weiny To: Matthew Wilcox Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Will Deacon , Catalin Marinas , Russell King , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org Subject: Re: [PATCH 1/7] mm: Document x86 uses a linked list of pgds Message-ID: <20200428214109.GB406458@iweiny-DESK2.sc.intel.com> References: <20200428194449.22615-1-willy@infradead.org> <20200428194449.22615-2-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200428194449.22615-2-willy@infradead.org> User-Agent: Mutt/1.11.1 (2018-12-01) 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: On Tue, Apr 28, 2020 at 12:44:43PM -0700, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > x86 uses page->lru of the pages used for pgds, but that's not immediately > obvious to anyone looking to make changes. Add a struct list_head to > the union so it's clearly in use for pgds. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > include/linux/mm_types.h | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > index 4aba6c0c2ba8..9bb34e2cd5a5 100644 > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -142,8 +142,13 @@ struct page { > struct list_head deferred_list; > }; > struct { /* Page table pages */ > - unsigned long _pt_pad_1; /* compound_head */ > - pgtable_t pmd_huge_pte; /* protected by page->ptl */ > + union { > + struct list_head pgd_list; /* x86 */ Shouldn't pgd_list_{add,del}() use this list head variable instead of lru to complete the documentation? Probably the list iteration loops arch/x86/* as well? Ira > + struct { > + unsigned long _pt_pad_1; > + pgtable_t pmd_huge_pte; > + }; > + }; > unsigned long _pt_pad_2; /* mapping */ > union { > struct mm_struct *pt_mm; /* x86 pgds only */ > -- > 2.26.2 > >