From: Phil Auld <pauld@redhat.com>
To: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Cc: linux-kernel@vger.kernel.org, fweisbec@gmail.com,
bristot@redhat.com, vschneid@redhat.com, cmetcalf@ezchip.com,
mgorman@suse.de, bsegall@google.com, rostedt@goodmis.org,
dietmar.eggemann@arm.com, vincent.guittot@linaro.org,
juri.lelli@redhat.com, peterz@infradead.org, mingo@redhat.com,
mtosatti@redhat.com
Subject: Re: [PATCH] nohz/full, sched/rt: Fix missed tick-reenabling bug in dequeue_task_rt
Date: Fri, 15 Jul 2022 12:54:21 -0400 [thread overview]
Message-ID: <YtGbvaia8oOulMEo@lorien.usersys.redhat.com> (raw)
In-Reply-To: <20220628092259.330171-1-nsaenzju@redhat.com>
On Tue, Jun 28, 2022 at 11:22:59AM +0200 Nicolas Saenz Julienne wrote:
> dequeue_task_rt() only decrements 'rt_rq->rt_nr_running' after having
> called sched_update_tick_dependency() preventing it from re-enabling the
> tick on systems that no longer have pending SCHED_RT tasks but have
> multiple runnable SCHED_OTHER tasks:
>
> dequeue_task_rt()
> dequeue_rt_entity()
> dequeue_rt_stack()
> dequeue_top_rt_rq()
> sub_nr_running() // decrements rq->nr_running
> sched_update_tick_dependency()
> sched_can_stop_tick() // checks rq->rt.rt_nr_running,
> ...
> __dequeue_rt_entity()
> dec_rt_tasks() // decrements rq->rt.rt_nr_running
> ...
>
> Every other scheduler class performs the operation in the opposite
> order, and sched_update_tick_dependency() expects the values to be
> updated as such. So avoid the misbehaviour by inverting the order in
> which the above operations are performed in the RT scheduler.
>
> Fixes: 76d92ac305f2 ("sched: Migrate sched to use new tick dependency mask model")
> Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
That's been around for a while. This change looks right and makes sense
to me.
Thanks,
Phil
Reviewed-by: Phil Auld <pauld@redhat.com>
--
next prev parent reply other threads:[~2022-07-15 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 9:22 [PATCH] nohz/full, sched/rt: Fix missed tick-reenabling bug in dequeue_task_rt Nicolas Saenz Julienne
2022-07-01 11:25 ` Valentin Schneider
2022-07-01 11:35 ` Nicolas Saenz Julienne
2022-07-13 17:18 ` Nicolas Saenz Julienne
2022-07-20 12:50 ` Peter Zijlstra
2022-07-15 16:54 ` Phil Auld [this message]
2022-07-21 8:44 ` [tip: sched/core] nohz/full, sched/rt: Fix missed tick-reenabling bug in dequeue_task_rt() tip-bot2 for Nicolas Saenz Julienne
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=YtGbvaia8oOulMEo@lorien.usersys.redhat.com \
--to=pauld@redhat.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=cmetcalf@ezchip.com \
--cc=dietmar.eggemann@arm.com \
--cc=fweisbec@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=mtosatti@redhat.com \
--cc=nsaenzju@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
/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