From: Mike Rapoport <rppt@kernel.org> To: Matthew Wilcox <willy@infradead.org> Cc: linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>, linux-mips@vger.kernel.org, Max Filippov <jcmvbkbc@gmail.com>, Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>, linux-csky@vger.kernel.org, sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, Stephen Rothwell <sfr@canb.auug.org.au>, linux-hexagon@vger.kernel.org, Joerg Roedel <joro@8bytes.org>, Mike Rapoport <rppt@linux.ibm.com>, Abdul Haleem <abdhalee@linux.vnet.ibm.com>, linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Arnd Bergmann <arnd@arndb.de>, linux-s390@vger.kernel.org, linux-um@lists.infradead.org, Steven Rostedt <rostedt@goodmis.org>, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, Andy Lutomirski <luto@kernel.org>, Stafford Horne <shorne@gmail.com>, linux-arm-kernel@lists.infradead.org, linux-pari Subject: Re: [PATCH 4/8] asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one() Date: Mon, 29 Jun 2020 18:59:20 +0300 [thread overview] Message-ID: <20200629155920.GD1492837@kernel.org> (raw) In-Reply-To: <20200627190304.GG25039@casper.infradead.org> On Sat, Jun 27, 2020 at 08:03:04PM +0100, Matthew Wilcox wrote: > On Sat, Jun 27, 2020 at 05:34:49PM +0300, Mike Rapoport wrote: > > More elaborate versions on arm64 and x86 account memory for the user page > > tables and call to pgtable_pmd_page_ctor() as the part of PMD page > > initialization. > > > > Move the arm64 version to include/asm-generic/pgalloc.h and use the generic > > version on several architectures. > > > > The pgtable_pmd_page_ctor() is a NOP when ARCH_ENABLE_SPLIT_PMD_PTLOCK is > > not enabled, so there is no functional change for most architectures except > > of the addition of __GFP_ACCOUNT for allocation of user page tables. > > Thanks for including this line; it reminded me that we're not setting > the PageTable flag on the page, nor accounting it to the zone page stats. > Hope you don't mind me tagging a patch to do that on as 9/8. We also never set PageTable flag for early page tables and for the page tables allocated directly with get_free_page(), e.g PTI, KASAN. > We could also do with a pud_page_[cd]tor and maybe even p4d/pgd versions. > But that brings me to the next question -- could/should some of this > be moved over to asm-generic/pgalloc.h? The ctor/dtor aren't called > from anywhere else, and there's value to reducing the total amount of > code in mm.h, but then there's also value to keeping all the ifdef > ARCH_ENABLE_SPLIT_PMD_PTLOCK code together too. So I'm a bit torn. > What do you think? -- Sincerely yours, Mike.
WARNING: multiple messages have this Message-ID (diff)
From: Mike Rapoport <rppt@kernel.org> To: Matthew Wilcox <willy@infradead.org> Cc: linux-kernel@vger.kernel.org, Abdul Haleem <abdhalee@linux.vnet.ibm.com>, Andrew Morton <akpm@linux-foundation.org>, Andy Lutomirski <luto@kernel.org>, Arnd Bergmann <arnd@arndb.de>, Christophe Leroy <christophe.leroy@csgroup.eu>, Joerg Roedel <joro@8bytes.org>, Max Filippov <jcmvbkbc@gmail.com>, Mike Rapoport <rppt@linux.ibm.com>, Peter Zijlstra <peterz@infradead.org>, Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>, Stafford Horne <shorne@gmail.com>, Stephen Rothwell <sfr@canb.auug.org.au>, Steven Rostedt <rostedt@goodmis.org>, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org Subject: Re: [PATCH 4/8] asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one() Date: Mon, 29 Jun 2020 18:59:20 +0300 [thread overview] Message-ID: <20200629155920.GD1492837@kernel.org> (raw) Message-ID: <20200629155920.X7WYY_oOvPC2WtCafA0UNvDcqIsgm2ZhWawsY06VM1I@z> (raw) In-Reply-To: <20200627190304.GG25039@casper.infradead.org> On Sat, Jun 27, 2020 at 08:03:04PM +0100, Matthew Wilcox wrote: > On Sat, Jun 27, 2020 at 05:34:49PM +0300, Mike Rapoport wrote: > > More elaborate versions on arm64 and x86 account memory for the user page > > tables and call to pgtable_pmd_page_ctor() as the part of PMD page > > initialization. > > > > Move the arm64 version to include/asm-generic/pgalloc.h and use the generic > > version on several architectures. > > > > The pgtable_pmd_page_ctor() is a NOP when ARCH_ENABLE_SPLIT_PMD_PTLOCK is > > not enabled, so there is no functional change for most architectures except > > of the addition of __GFP_ACCOUNT for allocation of user page tables. > > Thanks for including this line; it reminded me that we're not setting > the PageTable flag on the page, nor accounting it to the zone page stats. > Hope you don't mind me tagging a patch to do that on as 9/8. We also never set PageTable flag for early page tables and for the page tables allocated directly with get_free_page(), e.g PTI, KASAN. > We could also do with a pud_page_[cd]tor and maybe even p4d/pgd versions. > But that brings me to the next question -- could/should some of this > be moved over to asm-generic/pgalloc.h? The ctor/dtor aren't called > from anywhere else, and there's value to reducing the total amount of > code in mm.h, but then there's also value to keeping all the ifdef > ARCH_ENABLE_SPLIT_PMD_PTLOCK code together too. So I'm a bit torn. > What do you think? -- Sincerely yours, Mike.
next prev parent reply other threads:[~2020-06-29 15:59 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-27 14:34 [PATCH 0/8] mm: cleanup usage of <asm/pgalloc.h> Mike Rapoport 2020-06-27 14:34 ` [PATCH 1/8] mm: remove unneeded includes " Mike Rapoport 2020-06-29 15:41 ` Geert Uytterhoeven 2020-06-27 14:34 ` [PATCH 2/8] opeinrisc: switch to generic version of pte allocation Mike Rapoport 2020-06-27 21:23 ` Stafford Horne 2020-06-27 14:34 ` [PATCH 3/8] xtensa: " Mike Rapoport 2020-06-27 14:34 ` [PATCH 4/8] asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one() Mike Rapoport 2020-06-27 19:03 ` Matthew Wilcox 2020-06-28 7:10 ` Mike Rapoport 2020-06-28 7:10 ` Mike Rapoport 2020-06-29 15:59 ` Mike Rapoport [this message] 2020-06-29 15:59 ` Mike Rapoport 2020-06-27 14:34 ` [PATCH 5/8] asm-generic: pgalloc: provide generic pud_alloc_one() and pud_free_one() Mike Rapoport 2020-06-27 14:34 ` [PATCH 6/8] asm-generic: pgalloc: provide generic pgd_free() Mike Rapoport 2020-06-29 15:42 ` Geert Uytterhoeven 2020-06-27 14:34 ` [PATCH 7/8] mm: move lib/ioremap.c to mm/ Mike Rapoport 2020-06-27 14:34 ` [PATCH 8/8] mm: move p?d_alloc_track to separate header file Mike Rapoport 2020-06-27 18:31 ` [PATCH 0/8] mm: cleanup usage of <asm/pgalloc.h> Matthew Wilcox 2020-06-27 18:46 ` [PATCH 9/8] mm: Account PMD tables like PTE tables Matthew Wilcox 2020-06-28 6:59 ` Mike Rapoport 2020-06-28 6:59 ` Mike Rapoport 2020-06-29 14:01 ` [PATCH 0/8] mm: cleanup usage of <asm/pgalloc.h> Pekka Enberg 2020-07-02 21:46 ` Mike Rapoport 2020-07-02 21:46 ` Mike Rapoport
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200629155920.GD1492837@kernel.org \ --to=rppt@kernel.org \ --cc=abdhalee@linux.vnet.ibm.com \ --cc=arnd@arndb.de \ --cc=jcmvbkbc@gmail.com \ --cc=joro@8bytes.org \ --cc=linux-arch@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-csky@vger.kernel.org \ --cc=linux-hexagon@vger.kernel.org \ --cc=linux-ia64@vger.kernel.org \ --cc=linux-m68k@lists.linux-m68k.org \ --cc=linux-mips@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=linux-s390@vger.kernel.org \ --cc=linux-sh@vger.kernel.org \ --cc=linux-snps-arc@lists.infradead.org \ --cc=linux-um@lists.infradead.org \ --cc=linux-xtensa@linux-xtensa.org \ --cc=luto@kernel.org \ --cc=openrisc@lists.librecores.org \ --cc=peterz@infradead.org \ --cc=rostedt@goodmis.org \ --cc=rppt@linux.ibm.com \ --cc=sathnaga@linux.vnet.ibm.com \ --cc=sfr@canb.auug.org.au \ --cc=shorne@gmail.com \ --cc=sparclinux@vger.kernel.org \ --cc=willy@infradead.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).