linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Valentin Schneider <valentin.schneider@arm.com>
Cc: Aubrey Li <aubrey.li@linux.intel.com>,
	mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, mgorman@techsingularity.net,
	qais.yousef@arm.com, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com,
	tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org,
	Mel Gorman <mgorman@suse.de>, Jiang Biao <benbjiang@gmail.com>
Subject: Re: [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup
Date: Mon, 7 Dec 2020 19:05:18 +0100	[thread overview]
Message-ID: <20201207180518.GR3040@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <jhjtusxtv7b.mognet@arm.com>

On Mon, Dec 07, 2020 at 04:52:24PM +0000, Valentin Schneider wrote:
> 
> On 07/12/20 15:48, Peter Zijlstra wrote:
> > On Wed, Nov 18, 2020 at 12:31:13PM +0800, Aubrey Li wrote:
> >> diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
> >> index f324dc36fc43..6f5947673e66 100644
> >> --- a/kernel/sched/idle.c
> >> +++ b/kernel/sched/idle.c
> >> @@ -163,6 +163,7 @@ static void cpuidle_idle_call(void)
> >>       */
> >>
> >>      if (cpuidle_not_available(drv, dev)) {
> >> +		update_idle_cpumask(this_rq(), true);
> >>              tick_nohz_idle_stop_tick();
> >>
> >>              default_idle_call();
> >> @@ -193,6 +194,7 @@ static void cpuidle_idle_call(void)
> >>                      max_latency_ns = dev->forced_idle_latency_limit_ns;
> >>              }
> >>
> >> +		update_idle_cpumask(this_rq(), true);
> >>              tick_nohz_idle_stop_tick();
> >>
> >>              next_state = cpuidle_find_deepest_state(drv, dev, max_latency_ns);
> >> @@ -205,10 +207,12 @@ static void cpuidle_idle_call(void)
> >>               */
> >>              next_state = cpuidle_select(drv, dev, &stop_tick);
> >>
> >> -		if (stop_tick || tick_nohz_tick_stopped())
> >> +		if (stop_tick || tick_nohz_tick_stopped()) {
> >> +			update_idle_cpumask(this_rq(), true);
> >>                      tick_nohz_idle_stop_tick();
> >
> > We already have a callback in tick_nohz_idle_stop_tick(), namely
> > nohz_balance_enter_idle().
> 
> That's a no-op for !NO_HZ_COMMON though. For similar reasons, Aubrey moved
> the clearing of the cpumask to scheduler_tick().
> 
> Are you saying this mechanism should only be driven for NO_HZ kernels?

IFF it keys off of the tick being stopped, then yes. But as said in the
other email, I think that's a very dubious thing to begin with.

  reply	other threads:[~2020-12-07 18:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18  4:31 [RFC PATCH v5] sched/fair: select idle cpu from idle cpumask for task wakeup Aubrey Li
2020-11-23  9:27 ` Vincent Guittot
2020-11-24  7:01   ` Li, Aubrey
2020-11-24 17:01     ` Vincent Guittot
2020-11-25  2:03       ` Li, Aubrey
2020-11-25  8:31         ` Vincent Guittot
2020-11-25 13:37           ` Li, Aubrey
2020-11-26  8:14             ` Vincent Guittot
2020-11-26  9:35               ` Li, Aubrey
2020-11-26  9:49                 ` Vincent Guittot
2020-12-07 15:48 ` Peter Zijlstra
2020-12-07 16:52   ` Valentin Schneider
2020-12-07 18:05     ` Peter Zijlstra [this message]
2020-12-07 15:50 ` Peter Zijlstra
2020-12-07 17:10   ` Mel Gorman

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=20201207180518.GR3040@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=aubrey.li@linux.intel.com \
    --cc=benbjiang@gmail.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@redhat.com \
    --cc=qais.yousef@arm.com \
    --cc=rostedt@goodmis.org \
    --cc=tim.c.chen@linux.intel.com \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).