[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250212102242.GB24784@noisy.programming.kicks-ass.net>
Date: Wed, 12 Feb 2025 11:22:42 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Rik van Riel <riel@...riel.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, bp@...en8.de,
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, jackmanb@...gle.com,
jannh@...gle.com, mhklinux@...look.com, andrew.cooper3@...rix.com,
Manali Shukla <Manali.Shukla@....com>
Subject: Re: [PATCH v10 09/12] x86/mm: enable broadcast TLB invalidation for
multi-threaded processes
On Wed, Feb 12, 2025 at 10:54:38AM +0100, Peter Zijlstra wrote:
> On Tue, Feb 11, 2025 at 04:08:04PM -0500, Rik van Riel wrote:
>
> > +static void broadcast_tlb_flush(struct flush_tlb_info *info)
> > +{
> > + bool pmd = info->stride_shift == PMD_SHIFT;
> > + unsigned long maxnr = invlpgb_count_max;
> > + unsigned long asid = info->mm->context.global_asid;
> > + unsigned long addr = info->start;
> > + unsigned long nr;
> > +
> > + /* Flushing multiple pages at once is not supported with 1GB pages. */
> > + if (info->stride_shift > PMD_SHIFT)
> > + maxnr = 1;
>
> How does this work?
>
> Normally, if we get a 1GB range, we'll iterate on the stride and INVLPG
> each one (just like any other stride).
>
> Should you not instead either force the stride down to PMD level or
> force a full flush?
Oh, n/m, I think I see.
Powered by blists - more mailing lists