On Mon, Jun 17, 2019 at 11:32:55PM +0900, Takao Indoh wrote: > From: Takao Indoh <indou.takao@xxxxxxxxxxx> > > This patch adds new boot parameter 'disable_tlbflush_is' to disable TLB > flush within the same inner shareable domain for performance tuning. > > In the case of flush_tlb_mm() *without* this parameter, TLB entry is > invalidated by __tlbi(aside1is, asid). By this instruction, all CPUs within > the same inner shareable domain check if there are TLB entries which have > this ASID, this causes performance noise, especially at large-scale HPC > environment, which has more than thousand nodes with low latency > interconnect. > > When this new parameter is specified, TLB entry is invalidated by > __tlbi(aside1, asid) only on the CPUs specified by mm_cpumask(mm). > Therefore TLB flush is done on minimal CPUs and performance problem does > not occur. > > Signed-off-by: QI Fuli <qi.fuli@xxxxxxxxxxx> > Signed-off-by: Takao Indoh <indou.takao@xxxxxxxxxxx> [...] > +void flush_tlb_mm(struct mm_struct *mm) > +{ > + if (disable_tlbflush_is) > + on_each_cpu_mask(mm_cpumask(mm), ipi_flush_tlb_mm, > + (void *)mm, true); > + else > + __flush_tlb_mm(mm); > +} Could we try instead to call a _nosync variant here when cpumask_weight() is 1 or the *IS if greater than 1 and avoid the IPI? Will tried this in the past but because of the task placement after fork()+execve(), I think we always ended up with a weight of 2 in the child process. Your first patch "solves" this by flushing the TLBs on context switch (bar the CnP case). Can you give it a try to see if it improves things? At least it's a starting point for further investigation. I fully agree with Will that we don't want two different TLB handling implementations in the arm64 kernel and even less desirable to have a command line option. Thanks. -- Catalin