From: Kuba Piecuch <jpiecuch@google.com>
To: Kuba Piecuch <jpiecuch@google.com>,
Andrea Righi <arighi@nvidia.com>, Tejun Heo <tj@kernel.org>,
David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>
Cc: Emil Tsalapatis <emil@etsalapatis.com>,
Daniel Hodges <hodgesd@meta.com>, <sched-ext@lists.linux.dev>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] sched_ext: Document task ownership state machine
Date: Fri, 20 Mar 2026 16:47:19 +0000 [thread overview]
Message-ID: <DH7RGO3IWK1M.U5C5YN0W5EL@google.com> (raw)
In-Reply-To: <DH7NTJ4IRIY1.GFW9V7S6Y1KU@google.com>
On Fri Mar 20, 2026 at 1:56 PM UTC, Kuba Piecuch wrote:
> This prompted me to have a look at the logic around SCX_OPSS_QUEUED and I can't
> convince myself that it's correct in the case of direct dispatches to
> non-builtin DSQs.
>
> The only place where ops_state is set to QUEUED is at the end of
> do_enqueue_task(). Notably, this assignment is skipped in the case of direct
> dispatch.
>
> direct_dispatch() will then call dispatch_enqueue() with SCX_ENQ_CLEAR_OPSS,
> causing ops_state to be reset to NONE. We end up in a state where the task
> is enqueued on a user DSQ, its ops_state is NONE and p->scx.flags has
> SCX_TASK_IN_CUSTODY, which doesn't look like a consistent state to me.
>
> Am I missing something here?
I just saw the comment in ops_dequeue() introduced by your ops.dequeue()
patchset, so I guess this is WAI. Please disregard this comment.
next prev parent reply other threads:[~2026-03-20 16:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 6:29 Andrea Righi
2026-03-05 16:25 ` Tejun Heo
2026-03-20 13:56 ` Kuba Piecuch
2026-03-20 16:47 ` Kuba Piecuch [this message]
2026-03-20 18:16 ` Kuba Piecuch
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=DH7RGO3IWK1M.U5C5YN0W5EL@google.com \
--to=jpiecuch@google.com \
--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=tj@kernel.org \
--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