Sched_ext development
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: Cheng-Yang Chou <yphbchou0911@gmail.com>,
	sched-ext@lists.linux.dev, David Vernet <void@manifault.com>,
	Changwoo Min <changwoo@igalia.com>,
	Kuba Piecuch <jpiecuch@google.com>,
	Ching-Chun Huang <jserv@ccns.ncku.edu.tw>,
	Chia-Ping Tsai <chia7712@gmail.com>
Subject: Re: [PATCH v3 1/2] sched_ext: Add dispatch transaction API
Date: Sun, 10 May 2026 04:02:33 -1000	[thread overview]
Message-ID: <agCP-e9ZL8smNoNQ@slm.duckdns.org> (raw)
In-Reply-To: <af-l_M9p9npc9FUA@gpd4>

Hello,

On Sat, May 09, 2026 at 11:24:12PM +0200, Andrea Righi wrote:
> Why not passing slice to scx_bpf_dsq_insert_commit()? Is it because of the BPF
> args limitation? In that case we could introduce a struct similar to
> scx_bpf_dsq_insert_vtime_args.
> 
> Speaking of vtime, we may also need a scx_bpf_dsq_insert_vtime_commit() that
> accepts dsq_vtime as well, otherwise how do we use priority DSQs with this new
> transaction variant?

Given that these are only meaningful when targeting local DSQs, I don't
think vtime interface is necessary. It'd probably be a good idea to
explicitly restrict usage to local DSQs.

> > To support explicit token passing, rename scx_dsq_insert_commit() to
> > scx_dsq_insert_buf() and add a qseq parameter. All existing callers
> > preserve the original behavior.
> > 
> > This mechanism is intended for schedulers that do not implement
> > properly synchronized dequeue. A scheduler whose ops.dequeue()
> > synchronizes atomically with the dispatch path does not need this API.
> 
> I'm wondering if we should validate qseq also in mark_direct_dispatch(), it
> seems that we're not validating qseq in the direct dispatch path, or am I
> missing something?

In DD path, the task can't be lost and it'd be a bit silly to use this
interface. Again, probably good idea to at least start with just allowing in
dispatch path.

Thanks.

-- 
tejun

  reply	other threads:[~2026-05-10 14:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-09 19:11 [PATCH v3 sched_ext/for-7.2 0/2] sched_ext: Add dispatch transaction API Cheng-Yang Chou
2026-05-09 19:11 ` [PATCH v3 1/2] " Cheng-Yang Chou
2026-05-09 19:49   ` sashiko-bot
2026-05-09 21:24   ` Andrea Righi
2026-05-10 14:02     ` Tejun Heo [this message]
2026-05-10 14:58       ` Andrea Righi
2026-05-15 14:50         ` Cheng-Yang Chou
2026-05-10 14:06   ` Tejun Heo
2026-05-15 14:36     ` Cheng-Yang Chou
2026-05-09 19:11 ` [PATCH v3 2/2] selftests/sched_ext: Add dispatch_cookie test Cheng-Yang Chou
2026-05-09 20:16   ` sashiko-bot
2026-05-09 21:43   ` Andrea Righi
2026-05-15 13:42     ` Cheng-Yang Chou

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=agCP-e9ZL8smNoNQ@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=chia7712@gmail.com \
    --cc=jpiecuch@google.com \
    --cc=jserv@ccns.ncku.edu.tw \
    --cc=sched-ext@lists.linux.dev \
    --cc=void@manifault.com \
    --cc=yphbchou0911@gmail.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