From: soolaugust@gmail.com
To: K Prateek Nayak <kprateek.nayak@amd.com>
Cc: zhidao su <suzhidao@xiaomi.com>,
soolaugust@gmail.com, linux-kernel@vger.kernel.org,
John Stultz <jstultz@google.com>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@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>
Subject: Re: [PATCH] sched/proxy_exec: Handle sched_delayed owner in find_proxy_task()
Date: Tue, 3 Mar 2026 14:30:07 +0800 [thread overview]
Message-ID: <20260303063007.125383-1-soolaugust@gmail.com> (raw)
In-Reply-To: <fabb2e9a-5141-4c30-baf2-05aae40d4ee9@amd.com>
From: zhidao su <suzhidao@xiaomi.com>
On 3/3/2026 11:29 AM, K Prateek Nayak wrote:
> Just switching to idle will not alter the EEVDF state and the pick
> will still converge on the same task whose owner will still be
> delayed.
>
> [...]
> ... And the cycle repeats with preemption disabled !!!
>
> This is terrible since blocked owner can be delayed on a busy runqueue
> for more than a few tick - sure it is a transient state but it can last
> for a while depending on the state of the cfs_rq where it is delayed,
> up to few 10s of milliseconds in a practical worst case scenario.
Agreed - the spinloop analysis is correct. pick_next_task() keeps
returning the same blocked donor; proxy_resched_idle() bounces off
idle each cycle until sched_delayed clears. Tens of milliseconds of
that is clearly unacceptable.
> proxy_deactivate() is correct to do for now until we get to the
> blocked owner handling.
Right. I'll send a v2 that keeps the two checks as separate blocks
(the conceptual distinction is worth preserving for when the blocked-
owner series lands), but uses proxy_deactivate() for both:
if (!READ_ONCE(owner->on_rq)) {
return proxy_deactivate(rq, donor);
}
if (owner->se.sched_delayed) {
/*
* Owner is in EEVDF deferred-dequeue: still physically on
* the runqueue but has called schedule(). A sched_delayed
* task never has blocked_on set, so the chain cannot be
* followed further. Deactivate the donor for now; proper
* handling will come with the blocked-owner series.
*
* XXX: Don't handle sched_delayed owners yet.
*/
return proxy_deactivate(rq, donor);
}
The comment replaces the shared "XXX" with per-case rationale, making
it clearer why they are handled differently once proper support lands.
Does that work, or would you prefer the two conditions be collapsed
back into one?
next prev parent reply other threads:[~2026-03-03 6:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 10:12 [PATCH] sched/proxy_exec: Handle sched_delayed owner in find_proxy_task() soolaugust
2026-03-03 5:59 ` K Prateek Nayak
2026-03-03 6:30 ` soolaugust [this message]
2026-03-03 6:43 ` K Prateek Nayak
2026-03-03 21:21 ` John Stultz
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=20260303063007.125383-1-soolaugust@gmail.com \
--to=soolaugust@gmail.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.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=suzhidao@xiaomi.com \
--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