From: Phil Auld <pauld@redhat.com>
To: Hillf Danton <hdanton@sina.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [PATCH] sched: use rq_lock/unlock in online_fair_sched_group
Date: Mon, 5 Aug 2019 10:06:53 -0400 [thread overview]
Message-ID: <20190805140653.GA20173@pauld.bos.csb> (raw)
In-Reply-To: <20190801133749.11033-1-pauld@redhat.com>
On Fri, Aug 02, 2019 at 05:20:38PM +0800 Hillf Danton wrote:
>
> On Thu, 1 Aug 2019 09:37:49 -0400 Phil Auld wrote:
> >
> > Enabling WARN_DOUBLE_CLOCK in /sys/kernel/debug/sched_features causes
> > warning to fire in update_rq_clock. This seems to be caused by onlining
> > a new fair sched group not using the rq lock wrappers.
> >
> > [472978.683085] rq->clock_update_flags & RQCF_UPDATED
> > [472978.683100] WARNING: CPU: 5 PID: 54385 at kernel/sched/core.c:210 update_rq_clock+0xec/0x150
>
> Another option perhaps only if that wrappers are not mandatory.
>
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -212,10 +212,14 @@ void update_rq_clock(struct rq *rq)
> #endif
>
> delta = sched_clock_cpu(cpu_of(rq)) - rq->clock;
> - if (delta < 0)
> - return;
> - rq->clock += delta;
> - update_rq_clock_task(rq, delta);
> + if (delta >= 0) {
> + rq->clock += delta;
> + update_rq_clock_task(rq, delta);
> + }
> +
> +#ifdef CONFIG_SCHED_DEBUG
> + rq->clock_update_flags &= ~RQCF_UPDATED;
> +#endif
> }
>
>
> --
>
I think that would silence the warning, but...
If we're to clear that flag right there, outside of the lock pinning code,
then I think we might as well just remove the flag and all associated
comments etc, no?
Cheers,
Phil
--
next prev parent reply other threads:[~2019-08-05 14:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 13:37 [PATCH] sched: use rq_lock/unlock in online_fair_sched_group Phil Auld
2019-08-05 14:06 ` Phil Auld [this message]
2019-08-06 13:03 ` Peter Zijlstra
2019-08-06 13:58 ` Phil Auld
2019-08-09 13:33 ` Phil Auld
2019-08-09 17:43 ` Valentin Schneider
2019-08-15 13:39 ` Phil Auld
2019-08-08 11:01 ` [tip:sched/core] sched/fair: Use " tip-bot for Phil Auld
2019-08-09 16:21 ` Dietmar Eggemann
2019-08-09 17:28 ` Phil Auld
2019-08-12 9:56 ` Dietmar Eggemann
2019-08-12 12:52 ` tip-bot for Phil Auld
2019-08-12 13:13 ` Phil Auld
[not found] <20190806060416.11440-1-hdanton@sina.com>
2019-08-06 12:58 ` [PATCH] sched: use " Phil Auld
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=20190805140653.GA20173@pauld.bos.csb \
--to=pauld@redhat.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--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).