[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250114123228.GAZ4ZZXK7Vd-KlM-Cc@fat_crate.local>
Date: Tue, 14 Jan 2025 13:32:28 +0100
From: Borislav Petkov <bp@...en8.de>
To: Rik van Riel <riel@...riel.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, peterz@...radead.org,
dave.hansen@...ux.intel.com, zhengqi.arch@...edance.com,
nadav.amit@...il.com, thomas.lendacky@....com, kernel-team@...a.com,
linux-mm@...ck.org, akpm@...ux-foundation.org, jannh@...gle.com
Subject: Re: [PATCH v4 01/12] x86/mm: make MMU_GATHER_RCU_TABLE_FREE
unconditional
On Sun, Jan 12, 2025 at 10:53:45AM -0500, Rik van Riel wrote:
> Currently x86 uses CONFIG_MMU_GATHER_TABLE_FREE when using
> paravirt, and not when running on bare metal.
>
> There is no real good reason to do things differently for
> each setup. Make them all the same.
>
> Currently get_user_pages_fast synchronizes against page table
> freeing in two different ways:
> - on bare metal, by blocking IRQs, which block TLB flush IPIs
> - on paravirt, with MMU_GATHER_RCU_TABLE_FREE
>
> This is done because some paravirt TLB flush implementations
> handle the TLB flush in the hypervisor, and will do the flush
> even when the target CPU has interrupts disabled.
>
> After this change, the synchronization between get_user_pages_fast
get_user_pages_fast() - make it look like a function.
Avoid having "This patch" or "This commit" or "After this change", etc in the
commit message. It is tautologically useless so use imperative tone directly:
"Always handle page table freeing with..."
> and page table freeing is always handled with MMU_GATHER_RCU_TABLE_FREE,
> which allows bare metal to also do TLB flushes while interrupts are
> disabled.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists