Skip to contentSkip to conversation

x86/mm: Avoid superflous leave_mm() in the TLB flush path

tip:x86/mm Linus Torvalds 3 participants 3 messages Dec 5, 2011 – Dec 6, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 7 lines · tip-bot for Shaohua Li

x86/mm: Avoid superflous leave_mm() in the TLB flush path

If just one page VA tlb is required to be flushed and current task is in lazy TLB state, doing leave_mm() is superfluous because it flushes the whole TLB.  This can reduce some TLB miss.

Are you sure this is a good idea?

We may be *much* better off leaving the VM and avoiding future IPI's than trying to flush pages one by one over and over again.

IPI's are expensive.

I don't think you thought this through, and if you *did* think it through and actually have numbers that it's cheaper to stay with the MM, I think you need to show those numbers.

Linus

#2 lore raw
Quoted 12 lines · Linus Torvalds
Quoted 7 lines · tip-bot for Shaohua Li

x86/mm: Avoid superflous leave_mm() in the TLB flush path

If just one page VA tlb is required to be flushed and current task is in lazy TLB state, doing leave_mm() is superfluous because it flushes the whole TLB. This can reduce some TLB miss.

Are you sure this is a good idea?

Quoted 8 lines

We may be *much* better off leaving the VM and avoiding future IPI's than trying to flush pages one by one over and over again.

IPI's are expensive.

I don't think you thought this through, and if you *did* think it through and actually have numbers that it's cheaper to stay with the MM, I think you need to show those numbers.

good point, I didn't think of it. It's unlikely we just flush one tlb page. please drop the patch.

Thanks,
Shaohua

#3 lore raw
Quoted 16 lines · Shaohua Li
Quoted 15 lines · Linus Torvalds
Quoted 7 lines · tip-bot for Shaohua Li

x86/mm: Avoid superflous leave_mm() in the TLB flush path

If just one page VA tlb is required to be flushed and current task is in lazy TLB state, doing leave_mm() is superfluous because it flushes the whole TLB. This can reduce some TLB miss.

Are you sure this is a good idea?

We may be *much* better off leaving the VM and avoiding future IPI's than trying to flush pages one by one over and over again.

Quoted 8 lines
Quoted 5 lines

IPI's are expensive.

I don't think you thought this through, and if you *did* think it through and actually have numbers that it's cheaper to stay with the MM, I think you need to show those numbers.

good point, I didn't think of it. It's unlikely we just flush one tlb page. please drop the patch.

Dropped, thanks guys.

Ingo