Re: leave_mm() and lazy TLB mode

From: Dong Feng
Date: Sat Oct 28 2006 - 20:19:10 EST


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 <middle.fengdong@xxxxxxxxx>:
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?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/