leave_mm() and lazy TLB mode
There are several places where some comments say leave_mm() disables TLB flush on CPUs in lazy TLB mode.
My question may be silly, ...
leave_mm() change the value of CR3 register. In my understanding, that causes TLB flush. Does this contradict with the definition of lazy TLB mode?
I read source code more and now I understand that the effect of leave_mm() is not only
1. bypassing the invocation to local_flush_tlb(), but also
2. prevent the curent CPU from receiving any more INVALIDATE_TLB_VECTOR IPI.
Some material makes me understand the lazy TLB mode this way, that is, a CPU's TLB will not be flushed since it enters lazy TLB mode till it return to normal TLB mode.
But according to the source code, it seems that a CPU still has to undergo at most one time TLB flush, that is, the flush caused by loading CR3 with swapper_pg_dir.
Could any one confirm whether my original understanding and my corrective understanding is correct? Thank you very much.
2006/10/29, Dong Feng <[email protected]>:
Quoted 9 lines
There are several places where some comments say
leave_mm()disables TLB flush on CPUs in lazy TLB mode.My question may be silly, ...
leave_mm()change the value of CR3 register. In my understanding, that causes TLB flush. Does this contradict with the definition of lazy TLB mode?