mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzju@redhat.com>
To: Valentin Schneider <vschneid@redhat.com>,
	linux-kernel@vger.kernel.org, fweisbec@gmail.com
Cc: bristot@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, 01 Jul 2022 13:35:15 +0200	[thread overview]
Message-ID: <238f23ab72d99c3d2737a1ef0b68aebe60de8f8a.camel@redhat.com> (raw)
In-Reply-To: <xhsmhedz55b2v.mognet@vschneid.remote.csb>

On Fri, 2022-07-01 at 12:25 +0100, Valentin Schneider wrote:
> On 28/06/22 11:22, 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.
> > 
> 
> I can't see anything wrong with your approach, though I did have to spend
> some time re-learning RT_GROUP_SCHED. The designated Fixes: commit looks
> about right too.
> 
> > Fixes: 76d92ac305f2 ("sched: Migrate sched to use new tick dependency mask model")
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
> 
> Reviewed-by: Valentin Schneider <vschneid@redhat.com>

Thanks!

-- 
Nicolás Sáenz


  reply	other threads:[~2022-07-01 11:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28  9:22 Nicolas Saenz Julienne
2022-07-01 11:25 ` Valentin Schneider
2022-07-01 11:35   ` Nicolas Saenz Julienne [this message]
2022-07-13 17:18 ` Nicolas Saenz Julienne
2022-07-20 12:50   ` Peter Zijlstra
2022-07-15 16:54 ` Phil Auld
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=238f23ab72d99c3d2737a1ef0b68aebe60de8f8a.camel@redhat.com \
    --to=nsaenzju@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=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

all inboxes | Powered by JetHome®