From: Peter Zijlstra <peterz@infradead.org>
To: Brendan Jackman <brendan.jackman@arm.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Morten Rasmussen <morten.rasmussen@arm.com>
Subject: Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus
Date: Wed, 20 Dec 2017 15:03:06 +0100 [thread overview]
Message-ID: <20171220140306.egxub7sog4il2plm@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20171201180157.18937-2-brendan.jackman@arm.com>
On Fri, Dec 01, 2017 at 06:01:56PM +0000, Brendan Jackman wrote:
> @@ -8955,8 +8964,20 @@ static void nohz_balancer_kick(void)
> if (ilb_cpu >= nr_cpu_ids)
> return;
>
> - if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(ilb_cpu)))
> + if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(ilb_cpu))) {
> + if (!only_update) {
> + /*
> + * There's a pending/ongoing nohz kick/balance. If it's
> + * just for stats, convert it to a proper load balance.
> + */
> + clear_bit(NOHZ_STATS_KICK, nohz_flags(ilb_cpu));
> + }
> return;
> + }
> +
> + if (only_update)
> + set_bit(NOHZ_STATS_KICK, nohz_flags(ilb_cpu));
> +
> /*
> * Use smp_send_reschedule() instead of resched_cpu().
> * This way we generate a sched IPI on the target cpu which
This looks racy.. if its not we don't need atomic ops, if it is but is
still fine it needs a comment.
next prev parent reply other threads:[~2017-12-20 14:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 18:01 [PATCH v2 0/2] sched/fair: remote load updates for idle CPUs Brendan Jackman
2017-12-01 18:01 ` [PATCH v2 1/2] sched: force update of blocked load of idle cpus Brendan Jackman
2017-12-20 14:03 ` Peter Zijlstra [this message]
2017-12-20 14:23 ` Vincent Guittot
2017-12-20 15:01 ` Peter Zijlstra
2017-12-20 15:05 ` Peter Zijlstra
2017-12-21 7:59 ` Vincent Guittot
2017-12-20 14:09 ` Peter Zijlstra
2017-12-20 14:27 ` Vincent Guittot
2017-12-21 10:01 ` Vincent Guittot
2017-12-01 18:01 ` [PATCH v2 2/2] sched/fair: Update blocked load from newly idle balance Brendan Jackman
2017-12-20 14:22 ` Peter Zijlstra
2017-12-21 9:19 ` Dietmar Eggemann
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=20171220140306.egxub7sog4il2plm@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=brendan.jackman@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@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
all inboxes | Powered by JetHome®