All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
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 16:58:13 +0200	[thread overview]
Message-ID: <agCdBQXkDNO4CWoT@gpd4> (raw)
In-Reply-To: <agCP-e9ZL8smNoNQ@slm.duckdns.org>

On Sun, May 10, 2026 at 04:02:33AM -1000, Tejun Heo wrote:
> 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.

Ack, it definitely makes sense to restrict this 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.

Also true. Thanks for clarifying.

-Andrea

  reply	other threads:[~2026-05-10 14:58 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
2026-05-10 14:58       ` Andrea Righi [this message]
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=agCdBQXkDNO4CWoT@gpd4 \
    --to=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=tj@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.