public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
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, mingo@redhat.com, mtosatti@redhat.com
Subject: Re: [PATCH] nohz/full, sched/rt: Fix missed tick-reenabling bug in dequeue_task_rt
Date: Wed, 20 Jul 2022 14:50:15 +0200	[thread overview]
Message-ID: <Ytf6B19HjYGPvJZ/@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <a508ce3c711ebac73695af98a5d17187e22e74cb.camel@redhat.com>

On Wed, Jul 13, 2022 at 07:18:42PM +0200, Nicolas Saenz Julienne wrote:
> On Tue, 2022-06-28 at 11:22 +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>
> > ---
> 
> Ping :)

Thanks! got stuck in the retbleed backlog :/

  reply	other threads:[~2022-07-20 12:50 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 [this message]
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=Ytf6B19HjYGPvJZ/@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --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=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