CPU1: thread A
CPU2: kernel thread, lazy mm context A
start: mmA->cpu_vm_mask=3;
<page in page 1234>
flush_tlb_mm()
__local_flush_tlb()
mmA->cpu_vm_mask=1
<IPI>
__local_flush_tlb()
<mmA->cpu_vm_mask remains 1>
<a speculative read operation load
the TLB entry for page4321>
<page out page 4321>
flush_tlb_mm()
__local_flush_tlb()
mmA->cpu_vm_mask=1
<no IPI>
<thread switch to a thread with mmA>
<no TLB flush, because newMM==active_mm>
<access page4321>
<uses the wrong pte from the TLB>
<boom>
I think the TLB flush could be postponed until switch_mm().
[but for flush_tlb_all(), it must be carried out immediately]
-- Manfred
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/