lkml.org 
[lkml]   [2018]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 7/7] x86,switch_mm: skip atomic operations for init_mm
From
Date
On Mon, 2018-07-16 at 03:04 +0200, Ingo Molnar wrote:
> * Rik van Riel <riel@surriel.com> wrote:
>
> > On Mon, 2018-07-16 at 01:04 +0200, Ingo Molnar wrote:
> > > * Rik van Riel <riel@surriel.com> wrote:
> > >
> > > > + /*
> > > > + * Stop remote flushes for the previous mm.
> > > > + * Skip the idle task; we never send init_mm
> > > > TLB
> > > > flushing IPIs,
> > > > + * but the bitmap manipulation can cause cache
> > > > line contention.
> > > > + */
> > > > + if (real_prev != &init_mm) {
> > > > + VM_WARN_ON_ONCE(!cpumask_test_cpu(cpu,
> > > > + mm_cpumask(rea
> > > > l_pr
> > > > ev)));
> > > > + cpumask_clear_cpu(cpu,
> > > > mm_cpumask(real_prev));
> > >
> > > BTW., could this optimization be (safely) extended to all (or
> > > most)
> > > !task->mm
> > > kernel threads?
> > >
> > > In particular softirq and threaded irq handlers could benefit
> > > greatly
> > > I suspect in
> > > certain networking intense workloads that happen to active them.
> >
> > Yes, it could.
> >
> > Are there kernel threads that use something other than
> > init_mm today?
>
> Yeah, I think that's the typical case - so at minimum the comment
> should be fixed:
>
> > > > + * Skip the idle task; we never send init_mm TLB
> flushing IPIs,
>
> and it should say 'skip kernel threads', right?

I will send a v6 that improves this comment, and has
the S-o-b thing you suggested for patch 1/7.

I think that addresses all the comments people had on
this patch series.

--
All Rights Reversed.[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-07-16 20:38    [W:1.478 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site