The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
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, 7 Jul 2026 07:52:24 +0200	[thread overview]
Message-ID: <akyUGFsa8kJt0Lim@gpd4> (raw)
In-Reply-To: <8bac2ab9236ec0c6db28debf4bf5157c@kernel.org>

On Mon, Jul 06, 2026 at 12:09:36PM -1000, Tejun Heo wrote:
> Hello, Andrea.
> 
> Sashiko's first point looks real to me. The fix covers infinite->finite,
> but a finite slice landing on a nohz_full CPU after idle has the same
> issue whenever the previous run wasn't infinite (finite->idle->finite):
> the enqueue path already cleared TICK_DEP_BIT_SCHED against the idle
> rq->curr, and set_next_task_scx() re-asserts only on a slice-type
> transition, so with SCX_RQ_CAN_STOP_TICK unchanged the tick stays
> stopped.
> 
> set_next_task_scx() knows the incoming task, so it can assert directly
> rather than keying off the transition, like sched_fair_update_stop_tick()
> does for CFS. Moving the finite assertion out of the transition branch
> should do it:
> 
> 	if (p->scx.slice != SCX_SLICE_INF && tick_nohz_full_cpu(cpu_of(rq)))
> 		tick_nohz_dep_set_cpu(cpu_of(rq), TICK_DEP_BIT_SCHED);
> 
> Can you fold that in and add a finite->idle->finite selftest case for v2?

Yep, I'm currently looking/fixing at the issues found by Sashiko. I'll send a
v2 in a bit.

Thanks,
-Andrea

  reply	other threads:[~2026-07-07  5:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 22:09   ` Tejun Heo
2026-07-07  5:52     ` Andrea Righi [this message]
2026-07-06 16: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-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

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=akyUGFsa8kJt0Lim@gpd4 \
    --to=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=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