Re: [PATCH 0 of 9] x86/smp function calls: convert x86 tlb flushes to use function calls [POST 2]

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Tuesday, August 19, 2008 - 12:32 am

> nice stuff!

If only those 35% wouldn't be there ...


If this is getting seriously optimized it would be useful to address
this at a slightly higher level in the generic MM.  As in expose
the queue on the TLB flush interfaces.

While munmap and exit are pretty good at batching flushes vmscan.c is terrible 
and tends to do all the flushing on clearing pages synchronously.

Back in 2.4 I at some point ran into a nasty livelock where 
one CPU would always flush the other and the other would always 
bounce some mm locks with the other and the CPUs were nearly 100% 
busy just doing while swapping. Fortunately that issue disappeared
with 2.6, but I still fear a little it will come back some day.

Also with these queued invalidates right now there is duplication
of data structures with the delayed mmu gather flusher in asm-generic/tlb.h.
Both have their own queue.

If the low level flusher is queuing anyways it might be useful
to do a x86 specific implementation that combines the both and
frees the pages once the queue has been processed. Perhaps
that could amortize part of the 35%? 

-Andi

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0 of 9] x86/smp function calls: convert x86 tlb flu ..., Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
[PATCH 1 of 9] x86: put tlb_flush_others() stats in debugfs, Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
[PATCH 2 of 9] x86-32: use smp_call_function_mask for SMP ..., Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
[PATCH 3 of 9] x86-64: use smp_call_function_mask for SMP ..., Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
[PATCH 4 of 9] x86: make tlb_32|64 closer, Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
[PATCH 5 of 9] x86: unify tlb.c, Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
[PATCH 6 of 9] smp_function_call: add multiple queues for ..., Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
[PATCH 7 of 9] x86: add multiple smp_call_function queues, Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
[PATCH 8 of 9] x86: make number of smp_call_function queue ..., Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
[PATCH 9 of 9] smp function calls: add kernel parameter to ..., Jeremy Fitzhardinge, (Mon Aug 18, 11:23 am)
Re: [PATCH 0 of 9] x86/smp function calls: convert x86 tlb ..., Jeremy Fitzhardinge, (Mon Aug 18, 10:37 pm)
Re: [PATCH 0 of 9] x86/smp function calls: convert x86 tlb ..., Jeremy Fitzhardinge, (Mon Aug 18, 11:18 pm)
Re: [PATCH 0 of 9] x86/smp function calls: convert x86 tlb ..., Andi Kleen, (Tue Aug 19, 12:32 am)
Re: [PATCH 0 of 9] x86/smp function calls: convert x86 tlb ..., Jeremy Fitzhardinge, (Tue Aug 19, 12:44 am)
Re: [PATCH 0 of 9] x86/smp function calls: convert x86 tlb ..., Jeremy Fitzhardinge, (Tue Aug 19, 1:04 am)
Re: [PATCH 0 of 9] x86/smp function calls: convert x86 tlb ..., Jeremy Fitzhardinge, (Tue Aug 19, 7:58 am)
Re: [PATCH 0 of 9] x86/smp function calls: convert x86 tlb ..., Jeremy Fitzhardinge, (Tue Aug 19, 7:58 am)