mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH sched/urgent] sched/deadline: Fix stale rq->dl_server after a server pick returns RETRY_TASK
Date: Mon, 2 Nov 2026 14:49:10 +0100	[thread overview]
Message-ID: <auiU1kk009NDsT0L@jlelli-thinkpadt14gen4.remote.csb> (raw)
In-Reply-To: <auUuuJnEI3HWkwYA@slm.duckdns.org>

On 30/10/26 13:56, Tejun Heo wrote:
> On Fri, Oct 30, 2026 at 12:18:42PM -1000, Tejun Heo wrote:
> > __pick_task_dl() records the server in rq->dl_server whenever the server's
> > pick returns non-NULL, RETRY_TASK included. __pick_next_task() clears
> > rq->dl_server at its top, but a RETRY_TASK restarts the pick below that
> > clear. put_prev_set_next_task() then hands the stale server to whatever the
> > restarted pick takes.
> > 
> > Since b3a2dfa8b42e ("sched/fair: Add newidle balance to pick_task_fair()"),
> > fair_server_pick_task() returns RETRY_TASK when the newidle balance released
> > the rq lock and a higher class task was enqueued meanwhile.
> > 
> > That task, an RT task for example, then carries the fair server in
> > p->dl_server until it is next put. The RV deadline monitors see the fair
> > server switch in with it, and core scheduling, if enabled meanwhile, treats
> > the task as deadline priority.
> > 
> > Don't record the server when its pick returns RETRY_TASK. The restarted pick
> > records whichever server it goes through, if any.
> > 
> > Verified with a synthetic reproducer.
> > 
> > Fixes: b3a2dfa8b42e ("sched/fair: Add newidle balance to pick_task_fair()")
> > Signed-off-by: Tejun Heo <tj@kernel.org>
> 
> Ugh, please ignore this one. Sent out the wrong patch. I'll test Juri's.

uhu, don't think any of my recently shared patches deal with this case?
:)

Thanks,
Juri


  reply	other threads:[~2026-11-02 13:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 22:18 Tejun Heo
2026-10-30 23:56 ` Tejun Heo
2026-11-02 13:49   ` Juri Lelli [this message]
2026-11-02 15:41     ` Tejun Heo
2026-10-31  1:19 ` Tejun Heo
2026-10-31 22:09   ` Tejun Heo

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=auiU1kk009NDsT0L@jlelli-thinkpadt14gen4.remote.csb \
    --to=juri.lelli@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.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®