From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
John Stultz <jstultz@google.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH sched_ext/for-7.4] sched_ext: Keep proxy donors with slice left on the local DSQ
Date: Fri, 02 Oct 2026 07:30:16 -1000 [thread overview]
Message-ID: <59be0f173a7bc73a5a7eb6927f635605@kernel.org> (raw)
In-Reply-To: <20261001191216.2391359-1-arighi@nvidia.com>
Hello, Andrea.
On Thu, Oct 01, 2026 at 09:12:16PM +0200, Andrea Righi wrote:
> + if ((p->scx.flags & SCX_TASK_IMMED) && !proxy_put) {
> p->scx.flags |= SCX_TASK_REENQ_PREEMPTED;
> scx_do_enqueue_task(rq, p, SCX_ENQ_REENQ, -1);
I wonder whether IMMED should matter for a blocked donor at all. IMMED
should trigger a reenqueue iff the task is not being serviced by a CPU. A
donor under proxy execution is being serviced. The CPU is working on its
behalf and there's nothing the scheduler can do to make it go faster by
placing it elsewhere. If so, a donor with slice left can stay on the local
DSQ regardless of IMMED and of which put this is, and
SCX_RQ_PROXY_PICK_PENDING isn't needed. The deferred local check would need
the same exemption as the task stays SCX_TASK_IMMED.
> + /* Delegate retained donor admission to its owning BPF scheduler. */
> + if (p->is_blocked) {
> + if (WARN_ON_ONCE(!sch))
> + goto switch_class;
> + WARN_ON_ONCE(!(sch->ops.flags & SCX_OPS_ENQ_BLOCKED));
> + scx_do_enqueue_task(rq, p, 0, -1);
> + goto switch_class;
> + }
Can this be folded into the following block? scx_do_enqueue_task() already
adds SCX_ENQ_BLOCKED, so a !p->is_blocked test on the ENQ_LAST condition
would route donors to the plain enqueue.
Thanks.
--
tejun
next prev parent reply other threads:[~2026-10-02 17:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 19:12 Andrea Righi
2026-10-02 17:30 ` Tejun Heo [this message]
2026-10-02 19:38 ` Andrea Righi
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=59be0f173a7bc73a5a7eb6927f635605@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=void@manifault.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®