* Re: [tip:x86/mm] x86/mm: Avoid superflous leave_mm() in the TLB flush path
[not found] <tip-287de5b2cb365b98190b5de8ace1c5a31768a5ae@git.kernel.org>
@ 2011-12-05 23:26 ` Linus Torvalds
2011-12-06 0:40 ` Shaohua Li
0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2011-12-05 23:26 UTC (permalink / raw)
To: linux-kernel, mingo, hpa, torvalds, shaohua.li, akpm, tglx, mingo
Cc: linux-tip-commits
On Mon, Dec 5, 2011 at 9:56 AM, tip-bot for Shaohua Li
<shaohua.li@intel.com> wrote:
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tip:x86/mm] x86/mm: Avoid superflous leave_mm() in the TLB flush path
2011-12-05 23:26 ` [tip:x86/mm] x86/mm: Avoid superflous leave_mm() in the TLB flush path Linus Torvalds
@ 2011-12-06 0:40 ` Shaohua Li
2011-12-06 5:31 ` Ingo Molnar
0 siblings, 1 reply; 3+ messages in thread
From: Shaohua Li @ 2011-12-06 0:40 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com,
akpm@linux-foundation.org, tglx@linutronix.de, mingo@elte.hu,
linux-tip-commits@vger.kernel.org
On Tue, 2011-12-06 at 07:26 +0800, Linus Torvalds wrote:
> On Mon, Dec 5, 2011 at 9:56 AM, tip-bot for Shaohua Li
> <shaohua.li@intel.com> wrote:
> >
> > 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.
good point, I didn't think of it. It's unlikely we just flush one tlb
page. please drop the patch.
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tip:x86/mm] x86/mm: Avoid superflous leave_mm() in the TLB flush path
2011-12-06 0:40 ` Shaohua Li
@ 2011-12-06 5:31 ` Ingo Molnar
0 siblings, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2011-12-06 5:31 UTC (permalink / raw)
To: Shaohua Li
Cc: Linus Torvalds, linux-kernel@vger.kernel.org, mingo@redhat.com,
hpa@zytor.com, akpm@linux-foundation.org, tglx@linutronix.de,
linux-tip-commits@vger.kernel.org
* Shaohua Li <shaohua.li@intel.com> wrote:
> On Tue, 2011-12-06 at 07:26 +0800, Linus Torvalds wrote:
> > On Mon, Dec 5, 2011 at 9:56 AM, tip-bot for Shaohua Li
> > <shaohua.li@intel.com> wrote:
> > >
> > > 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.
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-06 5:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <tip-287de5b2cb365b98190b5de8ace1c5a31768a5ae@git.kernel.org>
2011-12-05 23:26 ` [tip:x86/mm] x86/mm: Avoid superflous leave_mm() in the TLB flush path Linus Torvalds
2011-12-06 0:40 ` Shaohua Li
2011-12-06 5:31 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox