Messages in this thread | | | From | Andy Lutomirski <> | Date | Tue, 27 Aug 2019 16:07:55 -0700 | Subject | Re: [RFC PATCH v2 3/3] x86/mm/tlb: Avoid deferring PTI flushes on shootdown |
| |
On Fri, Aug 23, 2019 at 11:13 PM Nadav Amit <namit@vmware.com> wrote: > > When a shootdown is initiated, the initiating CPU has cycles to burn as > it waits for the responding CPUs to receive the IPI and acknowledge it. > In these cycles it is better to flush the user page-tables using > INVPCID, instead of deferring the TLB flush. > > The best way to figure out whether there are cycles to burn is arguably > to expose from the SMP layer when an acknowledgment is received. > However, this would break some abstractions. > > Instead, use a simpler solution: the initiating CPU of a TLB shootdown > would not defer PTI flushes. It is not always a win, relatively to > deferring user page-table flushes, but it prevents performance > regression. > > Signed-off-by: Nadav Amit <namit@vmware.com> > --- > arch/x86/include/asm/tlbflush.h | 1 + > arch/x86/mm/tlb.c | 10 +++++++++- > 2 files changed, 10 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h > index da56aa3ccd07..066b3804f876 100644 > --- a/arch/x86/include/asm/tlbflush.h > +++ b/arch/x86/include/asm/tlbflush.h > @@ -573,6 +573,7 @@ struct flush_tlb_info { > unsigned int initiating_cpu; > u8 stride_shift; > u8 freed_tables; > + u8 shootdown;
I find the name "shootdown" to be confusing. How about "more_than_one_cpu"?
| |