From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
Joel Fernandes <joelagnelf@nvidia.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] sched_ext: Enable tick for finite slices on nohz_full
Date: Tue, 07 Jul 2026 10:56:06 -1000 [thread overview]
Message-ID: <e18280314c02c349b186b09a3fef41af@kernel.org> (raw)
In-Reply-To: <20260707082537.918068-2-arighi@nvidia.com>
Hello, Andrea.
On Tue, Jul 07, 2026 at 10:17:59AM +0200, Andrea Righi wrote:
> if ((p->scx.slice == SCX_SLICE_INF) !=
> (bool)(rq->scx.flags & SCX_RQ_CAN_STOP_TICK)) {
> if (p->scx.slice == SCX_SLICE_INF) {
The slice type is tested three times here (the XOR, the inner if, and the
finite tail). Can you split on it once instead?
if (p->scx.slice == SCX_SLICE_INF) {
if (!(rq->scx.flags & SCX_RQ_CAN_STOP_TICK)) {
rq->scx.flags |= SCX_RQ_CAN_STOP_TICK;
sched_update_tick_dependency(rq);
update_other_load_avgs(rq);
}
} else {
if (rq->scx.flags & SCX_RQ_CAN_STOP_TICK) {
rq->scx.flags &= ~SCX_RQ_CAN_STOP_TICK;
update_other_load_avgs(rq);
}
if (tick_nohz_full_cpu(cpu_of(rq)))
tick_nohz_dep_set_cpu(cpu_of(rq), TICK_DEP_BIT_SCHED);
}
update_other_load_avgs() lands in both arms, but the infinite/finite split
reads more directly than keying off the transition.
Thanks.
--
tejun
next prev parent reply other threads:[~2026-07-07 20:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 8:17 [PATCHSET v2 sched_ext/for-7.2-fixes] sched_ext: Fix finite-slice ticks on nohz_full Andrea Righi
2026-07-07 8:17 ` [PATCH 1/2] sched_ext: Enable tick for finite slices " Andrea Righi
2026-07-07 20:56 ` Tejun Heo [this message]
2026-07-07 8:18 ` [PATCH 2/2] selftests/sched_ext: Verify nohz_full tick behavior Andrea Righi
-- strict thread matches above, loose matches on Subject: below --
2026-07-06 16:18 [PATCHSET sched_ext/for-7.2-fixes] sched_ext: Fix finite-slice ticks on nohz_full Andrea Righi
2026-07-06 16:18 ` [PATCH 1/2] sched_ext: Enable tick for finite slices " Andrea Righi
2026-07-06 16:49 ` sashiko-bot
2026-07-06 22:09 ` Tejun Heo
2026-07-07 5:52 ` Andrea Righi
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=e18280314c02c349b186b09a3fef41af@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=emil@etsalapatis.com \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--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