linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Rik van Riel <riel@surriel.com>
Cc: Waiman Long <longman@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Phil Auld <pauld@redhat.com>, Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH v2] sched/core: Don't use dying mm as active_mm of kthreads
Date: Mon, 29 Jul 2019 18:26:53 +0200	[thread overview]
Message-ID: <20190729162653.GE31381@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <aba144fbb176666a479420eb75e5d2032a893c83.camel@surriel.com>

On Mon, Jul 29, 2019 at 12:10:12PM -0400, Rik van Riel wrote:
> On Mon, 2019-07-29 at 17:44 +0200, Peter Zijlstra wrote:
> > On Mon, Jul 29, 2019 at 11:28:04AM -0400, Rik van Riel wrote:
> > > On Mon, 2019-07-29 at 17:03 +0200, Peter Zijlstra wrote:
> > > 
> > > > The 'sad' part is that x86 already switches to init_mm on idle
> > > > and we
> > > > only keep the active_mm around for 'stupid'.
> > > 
> > > Wait, where do we do that?
> > 
> > drivers/idle/intel_idle.c:              leave_mm(cpu);
> > drivers/acpi/processor_idle.c:  acpi_unlazy_tlb(smp_processor_id());
> 
> This is only done for deeper c-states, isn't it?

Not C1 but I forever forget where it starts doing that. IIRC it isn't
too hard to hit it often, and I'm fairly sure we always do it when we
hit NOHZ.

> > > > Rik and Andy were working on getting that 'fixed' a while ago,
> > > > not
> > > > sure
> > > > where that went.
> > > 
> > > My lazy TLB stuff got merged last year. 
> > 
> > Yes, but we never got around to getting rid of active_mm for x86,
> > right?
> 
> True, we still use active_mm. Getting rid of the
> active_mm refcounting alltogether did not look
> entirely worthwhile the hassle.

OK, clearly I forgot some of the details ;-)


  reply	other threads:[~2019-07-29 16:26 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-27 17:10 Waiman Long
2019-07-29  8:18 ` Qais Yousef
2019-07-29 21:06   ` Waiman Long
2019-07-29 21:33     ` Qais Yousef
2019-07-29  8:52 ` Peter Zijlstra
2019-07-29 14:24   ` [PATCH] sched: Clean up active_mm reference counting Peter Zijlstra
2019-07-29 15:01     ` Mathieu Desnoyers
2019-07-29 15:16     ` Waiman Long
2019-07-29 15:22       ` Peter Zijlstra
2019-07-29 15:29     ` Rik van Riel
2019-07-29 14:27   ` [PATCH v2] sched/core: Don't use dying mm as active_mm of kthreads Peter Zijlstra
2019-07-29 15:22     ` Waiman Long
2019-07-29 15:38       ` Peter Zijlstra
2019-07-29 14:51   ` Waiman Long
2019-07-29 15:03     ` Peter Zijlstra
2019-07-29 15:28       ` Rik van Riel
2019-07-29 15:44         ` Peter Zijlstra
2019-07-29 16:10           ` Rik van Riel
2019-07-29 16:26             ` Peter Zijlstra [this message]
2019-07-29 15:37       ` Waiman Long
2019-07-29 16:12         ` Rik van Riel
2019-07-29 16:22       ` Andy Lutomirski
2019-07-29  9:12 ` Michal Hocko
2019-07-29 15:27   ` Waiman Long
2019-07-29 18:58     ` Michal Hocko
2019-07-29 20:41       ` Waiman Long

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190729162653.GE31381@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longman@redhat.com \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=pauld@redhat.com \
    --cc=riel@surriel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox