lkml.org 
[lkml]   [2022]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/mm/tlb: ignore f->new_tlb_gen when zero
From
On 7/8/22 04:40, David Hildenbrand wrote:
>> diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
>> index d9314cc8b81f..d81b4084bb8a 100644
>> --- a/arch/x86/mm/tlb.c
>> +++ b/arch/x86/mm/tlb.c
>> @@ -771,14 +771,14 @@ static void flush_tlb_func(void *info)
>> return;
>> }
>>
>> - if (f->new_tlb_gen <= local_tlb_gen) {
>> + if (unlikely(f->new_tlb_gen != 0 && f->new_tlb_gen <= local_tlb_gen)) {
>> /*
>> * The TLB is already up to date in respect to f->new_tlb_gen.
>> * While the core might be still behind mm_tlb_gen, checking
>> * mm_tlb_gen unnecessarily would have negative caching effects
>> * so avoid it.
>> */
>> - return;
>> + goto done;
> Does this affect the performance numbers from aa44284960d5 ("x86/mm/tlb:
> Avoid reading mm_tlb_gen when possible")?

It depends on how many batched flushes that workload had. From the
looks of it, they're all one page:

madvise(addr + i, pgsize, MADV_DONTNEED);

so there shouldn't be *much* batching in play. But, it wouldn't hurt to
re-run them in either case.

\
 
 \ /
  Last update: 2022-07-08 17:14    [W:0.115 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site