Message ID | 20250213161423.449435-1-riel@surriel.com (mailing list archive) |
---|---|
Headers | show |
Series | AMD broadcast TLB invalidation | expand |
On Thu, 13 Feb 2025 at 17:20, Rik van Riel <riel@surriel.com> wrote: > > Add support for broadcast TLB invalidation using AMD's INVLPGB instruction. Oh - what if the user sets nopcid. We need to disable invlpgb in that case right? (I assume it could be made to work, but doesn't seem like a case worth optimising).
On Thu, 13 Feb 2025 at 19:31, Brendan Jackman <jackmanb@google.com> wrote: > > On Thu, 13 Feb 2025 at 17:20, Rik van Riel <riel@surriel.com> wrote: > > > > Add support for broadcast TLB invalidation using AMD's INVLPGB instruction. > > Oh - what if the user sets nopcid. We need to disable invlpgb in that > case right? > > (I assume it could be made to work, but doesn't seem like a case worth > optimising). BTW there are still a couple of unresolved threads from previous versions. KPTI comment: https://lore.kernel.org/linux-kernel/CA+i-1C2zuctxx6oPVVu0zBJ=Q=Hs73mgrWs5jsp8obARNcUS9g@mail.gmail.com/ and https://lore.kernel.org/linux-kernel/20250212104239.GF19118@noisy.programming.kicks-ass.net/ Clarify context-switch sync: https://lore.kernel.org/linux-kernel/CA+i-1C2CcQmrbdv0wLUJFD6m85D7LekejU=VdgMxnqZW=DRPxA@mail.gmail.com/ (there's another mention of it somewhere that I can't find) Suggestion for WARN_ON_ONCE: https://lore.kernel.org/linux-kernel/CA+i-1C3-F-VAy_JccwKx_AcD1mXsVcGHGwUFvi_ruAiqusiXZQ@mail.gmail.com/
On Thu, 2025-02-13 at 19:31 +0100, Brendan Jackman wrote: > On Thu, 13 Feb 2025 at 17:20, Rik van Riel <riel@surriel.com> wrote: > > > > Add support for broadcast TLB invalidation using AMD's INVLPGB > > instruction. > > Oh - what if the user sets nopcid. We need to disable invlpgb in that > case right? > That's automatic, when !X86_FEATURE_PCID, choose_new_asid() always returns 0, and we never assign a global ASID to a task on any CPU. I suppose we could make "nopcid" a little more efficient by short-circuiting the code in consider_global_asid() as well, but it should already work correctly. Peter, do you prefer a v12, or should additional small fixes and improvements just be sent in follow-up patches at this point?
On Thu, Feb 13, 2025 at 03:02:40PM -0500, Rik van Riel wrote: > Peter, do you prefer a v12, or should > additional small fixes and improvements > just be sent in follow-up patches at > this point? I think I'm mostly okay at this point, but DaveH was wanting to have a look at this thing. Dave did you get around to reading one of these recent versions, wdyt?
On Fri, 14 Feb 2025 at 10:36, Peter Zijlstra <peterz@infradead.org> wrote: > > On Thu, Feb 13, 2025 at 03:02:40PM -0500, Rik van Riel wrote: > > > Peter, do you prefer a v12, or should > > additional small fixes and improvements > > just be sent in follow-up patches at > > this point? > > I think I'm mostly okay at this point, but DaveH was wanting to have a > look at this thing. Dave did you get around to reading one of these > recent versions, wdyt? I was waiting until my nitpicks were resolved but if you merge it before then, please add my: Reviewed-by: Brendan Jackman <jackmanb@google.com>