From: Valentin Schneider <valentin.schneider@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
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, 07 Dec 2020 16:52:24 +0000 [thread overview]
Message-ID: <jhjtusxtv7b.mognet@arm.com> (raw)
In-Reply-To: <20201207154838.GP3040@hirez.programming.kicks-ass.net>
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? I
would tend to agree with Vincent that this could still be useful for idling
without cutting the tick (!NO_HZ or shallow idle state); see:
20201124170136.GA26613@vingu-book
next prev parent reply other threads:[~2020-12-07 16:53 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 [this message]
2020-12-07 18:05 ` Peter Zijlstra
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=jhjtusxtv7b.mognet@arm.com \
--to=valentin.schneider@arm.com \
--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=peterz@infradead.org \
--cc=qais.yousef@arm.com \
--cc=rostedt@goodmis.org \
--cc=tim.c.chen@linux.intel.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).