From: Scott Wood <swood@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <frederic@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] timers/nohz: Update nohz load even if tick already stopped
Date: Wed, 11 Dec 2019 14:46:01 -0600 [thread overview]
Message-ID: <9a4db39373cf4acaf91ef6db92df116b74fef992.camel@redhat.com> (raw)
In-Reply-To: <20191030133130.GY4097@hirez.programming.kicks-ass.net>
On Wed, 2019-10-30 at 14:31 +0100, Peter Zijlstra wrote:
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index eb42b71faab9..d02d1b8f40af 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -3660,21 +3660,17 @@ static void sched_tick_remote(struct work_struct
> *work)
> u64 delta;
> int os;
>
> - /*
> - * Handle the tick only if it appears the remote CPU is running in
> full
> - * dynticks mode. The check is racy by nature, but missing a tick or
> - * having one too much is no big deal because the scheduler tick
> updates
> - * statistics and checks timeslices in a time-independent way,
> regardless
> - * of when exactly it is running.
> - */
> - if (idle_cpu(cpu) || !tick_nohz_tick_stopped_cpu(cpu))
> + if (!tick_nohz_tick_stopped_cpu(cpu))
> goto out_requeue;
>
> rq_lock_irq(rq, &rf);
> - curr = rq->curr;
> - if (is_idle_task(curr) || cpu_is_offline(cpu))
> + /*
> + * We must not call calc_load_nohz_remote() when not in NOHZ mode.
> + */
> + if (cpu_is_offline(cpu) || !tick_nohz_tick_stopped(cpu))
> goto out_unlock;
Is it really a problem if calc_load_nohz_remote() gets called in
non-NOHZ? It won't race due to rq lock -- and we're already mixing
remote and non-remote updates because the normal tick timer can still be
run while "stopped".
-Scott
prev parent reply other threads:[~2019-12-11 20:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 15:07 Frederic Weisbecker
2019-10-29 10:05 ` Peter Zijlstra
2019-10-30 8:48 ` Scott Wood
2019-10-30 13:31 ` Peter Zijlstra
2019-11-01 5:11 ` Scott Wood
2019-11-04 22:17 ` Thomas Gleixner
2019-11-04 23:43 ` Thomas Gleixner
2019-11-05 7:30 ` Scott Wood
2019-11-05 9:53 ` Thomas Gleixner
2019-11-08 8:16 ` Scott Wood
2019-11-05 12:43 ` Peter Zijlstra
2019-11-06 8:37 ` Peter Zijlstra
2019-11-08 8:13 ` Scott Wood
2019-12-11 20:37 ` Scott Wood
2019-12-11 20:46 ` Scott Wood [this message]
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=9a4db39373cf4acaf91ef6db92df116b74fef992.camel@redhat.com \
--to=swood@redhat.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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®