From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Vincent Guittot <vincent.guittot@linaro.org>, <mingo@redhat.com>,
<peterz@infradead.org>, <juri.lelli@redhat.com>,
<dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
<bsegall@google.com>, <mgorman@suse.de>, <vschneid@redhat.com>,
<linux-kernel@vger.kernel.org>, <qyousef@layalina.io>
Subject: Re: [PATCH 4/6 v2] sched/eevdf: Cancel slice protection if short slice task is eligible
Date: Tue, 16 Jun 2026 11:04:08 +0530 [thread overview]
Message-ID: <83a0e2d1-379e-46ad-8068-9a016260d082@amd.com> (raw)
In-Reply-To: <20260615162420.420957-5-vincent.guittot@linaro.org>
Hello Vincent,
On 6/15/2026 9:54 PM, Vincent Guittot wrote:
> @@ -9897,16 +9892,23 @@ static void wakeup_preempt_fair(struct rq *rq, struct task_struct *p, int wake_f
> if (!nse && cfs_rq->nr_queued)
> goto pick;
>
> + /*
> + * If @p is eligible but not the next task to run then cancel protection
> + * to prevent large scheduling latency
> + */
> + if (preempt_action == PREEMPT_WAKEUP_SHORT && entity_eligible(cfs_rq, pse))
> + goto preempt;
Can't we do this independent of the "pick" path if we are going to
resched anyways?
I suppose it is for set_next_buddy() bits but, if nse == pse, we cancel
the slice protection and resched anyways and the pick will naturally
go to pse so does set_next_buddy() even matter?
Instead, can PREEMPT_WAKEUP_SHORT path just do a set_preempt_buddy()
beforehand to ensure the task with the smallest deadline is already
the ->next and pick_next_entity() readily returns that?
> +
> if (sched_feat(RUN_TO_PARITY))
> update_protect_slice(cfs_rq, se);
>
> return;
>
> preempt:
> - if (preempt_action == PREEMPT_WAKEUP_SHORT) {
> - cancel_protect_slice(se);
> + cancel_protect_slice(se);
> +
> + if (preempt_action == PREEMPT_WAKEUP_SHORT && nse == pse)
> set_next_buddy(&p->se);
> - }
>
> resched_curr_lazy(rq);
> }
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-06-16 5:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 16:24 [PATCH 0/6 v2] sched/eevdf: Improve scheduling latency of short slice task Vincent Guittot
2026-06-15 16:24 ` [PATCH 1/6 v2] sched/fair: Set next buddy for preempt short Vincent Guittot
2026-06-16 8:51 ` Peter Zijlstra
2026-06-16 13:52 ` Vincent Guittot
2026-06-15 16:24 ` [PATCH 2/6 v2] sched/eevdf: Take into account current's lag when updating slice protection Vincent Guittot
2026-06-16 3:52 ` K Prateek Nayak
2026-06-16 12:11 ` Vincent Guittot
2026-06-16 9:29 ` Peter Zijlstra
2026-06-16 12:49 ` Vincent Guittot
2026-06-15 16:24 ` [PATCH 3/6 v2] sched/eevdf: Update slice protection even when resched is already set Vincent Guittot
2026-06-16 9:37 ` Peter Zijlstra
2026-06-16 13:57 ` Vincent Guittot
2026-06-15 16:24 ` [PATCH 4/6 v2] sched/eevdf: Cancel slice protection if short slice task is eligible Vincent Guittot
2026-06-16 5:34 ` K Prateek Nayak [this message]
2026-06-16 12:51 ` Vincent Guittot
2026-06-15 16:24 ` [PATCH 5/6 v2] sched/eevdf: Always update slice protection Vincent Guittot
2026-06-15 16:24 ` [PATCH 6/6 v2] sched/eevdf: Speedup short slice task scheduling Vincent Guittot
2026-06-16 10:57 ` Peter Zijlstra
2026-06-16 15:18 ` Vincent Guittot
2026-06-17 16:01 ` Vincent Guittot
2026-06-16 7:43 ` [PATCH 0/6 v2] sched/eevdf: Improve scheduling latency of short slice task K Prateek Nayak
2026-06-16 13:58 ` Vincent Guittot
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=83a0e2d1-379e-46ad-8068-9a016260d082@amd.com \
--to=kprateek.nayak@amd.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qyousef@layalina.io \
--cc=rostedt@goodmis.org \
--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®