From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
Daniel Hodges <hodgesd@meta.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched_ext: Document task ownership state machine
Date: Wed, 4 Mar 2026 06:23:57 -1000 [thread overview]
Message-ID: <aahcnV2xPabCGc-b@slm.duckdns.org> (raw)
In-Reply-To: <20260304153343.340285-1-arighi@nvidia.com>
Hello,
On Wed, Mar 04, 2026 at 04:33:43PM +0100, Andrea Righi wrote:
> + * Task Ownership State Machine (sched_ext_entity->ops_state)
> *
> + * The sched_ext core uses this state machine to track task ownership
> + * between the SCX core and the BPF scheduler. This allows the BPF
> + * scheduler to dispatch tasks without strict ordering requirements, while
> + * the SCX core safely rejects invalid dispatches.
> *
> + * State Transitions
> *
> + * .------------> NONE (owned by SCX core)
> + * | | ^
> + * | enqueue | | direct dispatch
> + * | v |
> + * | QUEUEING -------'
> + * | |
> + * | enqueue |
> + * | completes |
> + * | v
> + * | QUEUED (owned by BPF scheduler)
> + * | | ^
> + * | dispatch | | affinity changed
> + * | | | (dispatch aborts)
> + * | v |
> + * | DISPATCHING -----'
> + * | |
> + * | dispatch |
> + * | completes |
> + * `---------------'
I don't think we transition tasks from DISPATCHING to QUEUED on affinity
changes. Not yet anyway, right?
Thanks.
--
tejun
next prev parent reply other threads:[~2026-03-04 16:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 15:33 Andrea Righi
2026-03-04 16:23 ` Tejun Heo [this message]
2026-03-04 16:43 ` 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=aahcnV2xPabCGc-b@slm.duckdns.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=emil@etsalapatis.com \
--cc=hodgesd@meta.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
Powered by JetHome