linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Brodsky <kevin.brodsky@arm.com>
To: Dave Hansen <dave.hansen@intel.com>, linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	"Mike Rapoport (IBM)" <rppt@kernel.org>,
	Ryan Roberts <ryan.roberts@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will@kernel.org>,
	Matthew Wilcox <willy@infradead.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-kernel@vger.kernel.org,
	linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org,
	linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org,
	linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
	linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org,
	loongarch@lists.linux.dev, x86@kernel.org,
	Joerg Roedel <jroedel@suse.de>
Subject: Re: [PATCH 00/10] Account page tables at all levels
Date: Fri, 3 Jan 2025 10:28:32 +0100	[thread overview]
Message-ID: <80cf6cae-11f6-4db2-816b-b1dcca3cee3e@arm.com> (raw)
In-Reply-To: <989b55cf-1f9e-4b73-b3dd-d8b6a62be3f2@intel.com>

On 20/12/2024 20:31, Dave Hansen wrote:
> On 12/20/24 02:58, Kevin Brodsky wrote:
>>> One super tiny nit is that the PAE pgd _can_ be allocated using
>>> __get_free_pages(). It was originally there for Xen, but I think it's
>>> being used for PTI only at this point and the comments are wrong-ish.
>>>
>>> I kinda think we should just get rid of the 32-bit kmem_cache entirely.
>> That would certainly simplify things on the x86 side! I'm not at all
>> familiar with that code though, would you be happy with providing a
>> patch? I could add it to this series if that's convenient.
> I hacked this together yesterday:
>
>> https://git.kernel.org/pub/scm/linux/kernel/git/daveh/devel.git/log/?h=simplify-pae-20241220
> It definitely needs some more work. I'm particularly still puzzling
> about why SHARED_KERNEL_PMD is used both as a trigger for 32b vs.
> PAGE_SIZE PAE pgd allocations _and_ for the actual PMD sharing.
>
> Xen definitely needed the whole page behavior but I'm not sure why PTI did.
>
> Either way, that series should make the PAE PGDs a _bit_ less weird at
> the cost of an extra ~2 pages per process for folks who are running
> 32-bit PAE kernels with PTI disabled.
>
> But I think the diffstat is worth it:
>
>  5 files changed, 16 insertions(+), 96 deletions(-)

That does look like a nice simplification! After the first patch, with
my series, we could get rid of _pgd_alloc() and _pgd_free() in
arch/x86/mm/pgtable.c and just call __pgd_alloc() and __pgd_free() directly.

Considering that these changes are not trivial and may need more work,
should I let you post those patches as a separate series? If it gets
merged soon, I'll adapt my series, otherwise I can post a follow-up
patch later if needed.

- Kevin


      reply	other threads:[~2025-01-03  9:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19 16:44 Kevin Brodsky
2024-12-19 16:44 ` [PATCH 01/10] mm: Move common parts of pagetable_*_[cd]tor to helpers Kevin Brodsky
2024-12-19 17:19   ` Peter Zijlstra
2024-12-20 10:49     ` Kevin Brodsky
2024-12-20 11:46       ` Qi Zheng
2024-12-20 13:50         ` Kevin Brodsky
2024-12-20 14:16           ` Qi Zheng
2024-12-20 14:28             ` Kevin Brodsky
2024-12-20 14:35               ` Qi Zheng
2024-12-19 16:44 ` [PATCH 02/10] parisc: mm: Ensure pagetable_pmd_[cd]tor are called Kevin Brodsky
2024-12-19 16:44 ` [PATCH 03/10] m68k: mm: Add calls to pagetable_pmd_[cd]tor Kevin Brodsky
2024-12-19 16:44 ` [PATCH 04/10] s390/mm: Add calls to pagetable_pud_[cd]tor Kevin Brodsky
2024-12-19 16:44 ` [PATCH 05/10] riscv: mm: Skip pgtable level check in {pud,p4d}_alloc_one Kevin Brodsky
2025-01-03 10:31   ` Alexandre Ghiti
2025-01-03 10:36     ` Kevin Brodsky
2024-12-19 16:44 ` [PATCH 06/10] asm-generic: pgalloc: Provide generic p4d_{alloc_one,free} Kevin Brodsky
2024-12-19 16:44 ` [PATCH 07/10] mm: Introduce ctor/dtor at P4D level Kevin Brodsky
2024-12-19 16:44 ` [PATCH 08/10] ARM: mm: Rename PGD helpers Kevin Brodsky
2024-12-19 16:44 ` [PATCH 09/10] asm-generic: pgalloc: Provide generic __pgd_{alloc,free} Kevin Brodsky
2024-12-19 16:44 ` [PATCH 10/10] mm: Introduce ctor/dtor at PGD level Kevin Brodsky
2024-12-19 17:13 ` [PATCH 00/10] Account page tables at all levels Dave Hansen
2024-12-20 10:58   ` Kevin Brodsky
2024-12-20 14:45     ` Dave Hansen
2024-12-20 19:31     ` Dave Hansen
2025-01-03  9:28       ` Kevin Brodsky [this message]

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=80cf6cae-11f6-4db2-816b-b1dcca3cee3e@arm.com \
    --to=kevin.brodsky@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=jroedel@suse.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-alpha@vger.kernel.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-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-openrisc@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=linux-um@lists.infradead.org \
    --cc=loongarch@lists.linux.dev \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    --cc=willy@infradead.org \
    --cc=x86@kernel.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: link
Be 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