From: Kayra Cizmeci <kayracizmeci@gmail.com>
To: sh_def@163.com
Cc: arighi@nvidia.com, bsegall@google.com, connoro@google.com,
dietmar.eggemann@arm.com, jstultz@google.com,
juri.lelli@redhat.com, kprateek.nayak@amd.com,
linux-kernel@vger.kernel.org, mgorman@suse.de, mingo@redhat.com,
peterz@infradead.org, rostedt@goodmis.org,
sched-ext@lists.linux.dev, soolaugust@gmail.com,
vincent.guittot@linaro.org, vschneid@redhat.com
Subject: Re: [PATCH v5 1/4] sched: Dispatch task ticks for donor and execution classes
Date: Sun, 13 Sep 2026 15:08:14 +0300 [thread overview]
Message-ID: <20260913120814.1273086-1-kayracizmeci@gmail.com> (raw)
In-Reply-To: <20260913064722.1534766-2-sh_def@163.com>
Hello All, :>
> Proxy execution can run a task from one scheduling class on behalf of a
> donor from another. Scheduler ticks therefore need to reach both the class
> which owns the scheduling context and the class which owns the execution
> context.
So, donor and curr's classes may be different and we should call both of their task_ticks.
> Calling the donor first preserves the existing runtime-accounting order for
> execution-context consumers. Keep the existing class-specific tick behavior
> donor-gated in this patch, so the change only introduces the new interface
> and dispatch mechanism.
Hm..
> +/*
> + * Run the scheduling-context class first so its runtime update precedes
> + * execution-context tick work. A different execution class runs second.
> + * Same-class proxy execution gets one callback; ownership-specific work
> + * can select rq->donor or rq->curr as appropriate.
> + */
> +static inline void task_tick(struct rq *rq, int queued)
> +{
> + const struct sched_class *curr_class = rq->curr->sched_class;
> + const struct sched_class *donor_class = rq->donor->sched_class;
> +
> + donor_class->task_tick(rq, queued);
> + if (sched_proxy_exec() && curr_class != donor_class)
> + curr_class->task_tick(rq, queued);
> +}
> #ifdef CONFIG_SCHED_HRTICK
> /*
> * Use HR-timers to deliver accurate preemption points.
> @@ -923,7 +939,7 @@ static enum hrtimer_restart hrtick(struct hrtimer *timer)
>
> rq_lock(rq, &rf);
> update_rq_clock(rq);
> - rq->donor->sched_class->task_tick(rq, rq->donor, 1);
> + task_tick(rq, 1);
> rq_unlock(rq, &rf);
So. Let's assemble a senario.
rq->donor's class method will be DL, and rq->curr's will be fair. And the sched_proxy_exec() will be true.
ON THE OLD:
Only DL runs. That's all :>
ON THE NEW:
task_tick firstly runs donor's method. That's DL. Then we goto curr's class which is fair, and run that.
But because of the newly added checks, because of the donor's sched class not equals to the fair's the code just,
doesn't run.
Wouldn't it be better to merge this patch and it's use case together?
The commit message is confusing too "Scheduler ticks therefore need to reach both the class
which owns the scheduling context and the class which owns the execution
context." But the patch doesn't do this on it's own.
Thanks,
Kayra
next prev parent reply other threads:[~2026-09-13 12:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 6:47 [PATCH v5 0/4] sched: Handle split scheduling and execution contexts in task ticks Hui Su
2026-09-13 6:47 ` [PATCH v5 1/4] sched: Dispatch task ticks for donor and execution classes Hui Su
2026-09-13 12:08 ` Kayra Cizmeci [this message]
2026-09-13 13:07 ` Hui Su
2026-09-13 6:47 ` [PATCH v5 2/4] sched/numa: Drive NUMA task tick from execution context Hui Su
2026-09-13 6:47 ` [PATCH v5 3/4] sched/cache: Drive cache " Hui Su
2026-09-13 6:47 ` [PATCH v5 4/4] sched/core: Fix donor slice accounting under proxy execution Hui Su
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=20260913120814.1273086-1-kayracizmeci@gmail.com \
--to=kayracizmeci@gmail.com \
--cc=arighi@nvidia.com \
--cc=bsegall@google.com \
--cc=connoro@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sched-ext@lists.linux.dev \
--cc=sh_def@163.com \
--cc=soolaugust@gmail.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.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
all inboxes | Powered by JetHome®