public inbox for sched-ext@lists.linux.dev
 help / color / mirror / Atom feed
From: Cheng-Yang Chou <yphbchou0911@gmail.com>
To: Andrea Righi <arighi@nvidia.com>
Cc: sched-ext@lists.linux.dev, tj@kernel.org, void@manifault.com,
	changwoo@igalia.com, jserv@ccns.ncku.edu.tw
Subject: Re: [PATCH] sched_ext: Add scx_bpf_task_add_dsq_vtime()
Date: Thu, 12 Mar 2026 00:12:10 +0800	[thread overview]
Message-ID: <abGUWjfN4QFsBg3E@eric-acer> (raw)
In-Reply-To: <abGRI8SRYT3BKILf@gpd4>

Hi Andrea,

On Wed, Mar 11, 2026 at 04:58:27PM +0100, Andrea Righi wrote:
> Hm, I'm not sure we need a dedicated kfunc for this. Sub-schedulers can
> read p->scx.slice and p->scx.dsq_vtime from any task, they just can't
> modify those values for the tasks they don't own.
> 
> So they could read the current value, apply the delta, and then use
> scx_bpf_task_set_*() to update it.
> 
> Am I missing something here?

Oh I see.

My original thought was just to make the API a bit more convenient.
Instead of writing:

    scx_bpf_task_set_dsq_vtime(p, p->scx.dsq_vtime + delta);

Developers could simply write:

    scx_bpf_task_add_dsq_vtime(p, delta);

But as you pointed out, the set() helper is already a straightforward
one-liner and functionally identical. The authority check is also
properly handled.

I am totally fine with dropping this patch.

-- 
Thanks,
Cheng-Yang

      reply	other threads:[~2026-03-11 16:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 15:39 [PATCH] sched_ext: Add scx_bpf_task_add_dsq_vtime() Cheng-Yang Chou
2026-03-11 15:58 ` Andrea Righi
2026-03-11 16:12   ` Cheng-Yang Chou [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=abGUWjfN4QFsBg3E@eric-acer \
    --to=yphbchou0911@gmail.com \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=jserv@ccns.ncku.edu.tw \
    --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