From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
sched-ext@lists.linux.dev, Emil Tsalapatis <emil@etsalapatis.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 sched_ext/for-7.3] sched_ext: Bound per-task reenqueues and eject the owning scheduler
Date: Sun, 26 Jul 2026 09:49:37 -1000 [thread overview]
Message-ID: <d70a8f20c1773e0ade93b02272d96ab4@kernel.org> (raw)
In-Reply-To: <amW3rqVgsXHBvj6u@gpd4>
Hello, Andrea.
On Sun, Jul 26, 2026 at 09:30:54AM +0200, Andrea Righi wrote:
> > + if (enq_flags & SCX_ENQ_REENQ) {
> > + if (++p->scx.reenq_cnt > 1)
> > + __scx_add_event(sch, SCX_EV_REENQ_REPEAT, 1);
>
> Should we consider only consecutive kernel-driven retry reenqueues here, rather
> than every reenqueue? IIUC, the paths we need to limit are SCX_TASK_REENQ_IMMED
> and SCX_TASK_REENQ_CAP.
I think triggering it on all reenqueues is fine. No matter what, if a task
is getting reenqueued hundreds of times without running, something is going
wrong.
> Should reenq_cnt also be cleared in scx_disable_task(), together with the other
> SCX-managed fields?
>
> Otherwise, the count can survive switching the task to another scheduling class,
> replacing the BPF scheduler, or rehoming it to another sub-scheduler and the
> next owner could then be ejected based on the reenqueues from to the previous
> owner.
Yeah, that makes sense. Updated in v3.
> Documentation/scheduler/sched-ext.rst still uses SCX_EV_REENQ_LOCAL_REPEAT in
> both the sample events output and the counter description.
>
> The description also says that the event is specific to local DSQ reenqueues,
> while SCX_EV_REENQ_REPEAT now covers reenqueues from all sources. Can you update
> those two references as well?
Updated in v3.
Thanks.
--
tejun
prev parent reply other threads:[~2026-07-26 19:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 18:51 [PATCH sched_ext/for-7.3] sched_ext: Bound per-task reenqueues and eject the owning scheduler Tejun Heo
2026-07-25 19:05 ` [PATCH v2 " Tejun Heo
2026-07-26 7:30 ` Andrea Righi
2026-07-26 19:49 ` Tejun Heo [this message]
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=d70a8f20c1773e0ade93b02272d96ab4@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=emil@etsalapatis.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