All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuba Piecuch <jpiecuch@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	David Vernet <void@manifault.com>,
	 Andrea Righi <arighi@nvidia.com>,
	Changwoo Min <changwoo@igalia.com>,
	sched-ext@lists.linux.dev,  linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] sched_ext: Reenqueue IMMED tasks when a higher class wins the pick
Date: Mon, 30 Nov 2026 11:19:14 +0000	[thread overview]
Message-ID: <20261130111711.2673199-1-jpiecuch@google.com> (raw)
In-Reply-To: <df1075443b0ae279117917df4bf50425@kernel.org>

Hi Tejun,

On Fri, 27 Nov 2026 15:10, Tejun Heo wrote:
> Yeah, wakeup_preempt() misses the transitions which aren't wakeups. This
> looks correct to me, although it also looks like it can replace most of
> what wakeup_preempt() covers.

Right, the reenqueue in wakeup_preempt_scx() is no longer needed for
correctness. wakeup_preempt() always follows it with resched_curr() and
raises next_class, so rq_is_open() refuses new IMMED insertions until the
next pick, and that pick lands above ext and runs scx_settle_pick().

I kept it for latency. The wakeup-time reenqueue returns the IMMED tasks
to the BPF scheduler right away through the deferred irq_work or balance
callback, so they can be moved to another CPU while curr is still on its
way to a preemption point. With only scx_settle_pick(), they wait on the
local DSQ until curr actually schedules, which can take a while if curr
is in a preempt-off or IRQ-off section.

That said, if you'd rather have a single place for this, I can drop the
reenqueue from wakeup_preempt_scx() in v2.

Thanks,
Kuba

  reply	other threads:[~2026-11-30 11:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 11:50 [RFC PATCHSET sched_ext/for-7.4-fixes] sched_ext: Reenqueue IMMED tasks when a higher class wins the pick Kuba Piecuch
2026-11-25 11:50 ` [RFC PATCH 1/2] " Kuba Piecuch
2026-11-25 12:16   ` sashiko-bot
2026-11-30 11:19     ` Kuba Piecuch
2026-11-27 15:10   ` Tejun Heo
2026-11-30 11:19     ` Kuba Piecuch [this message]
2026-11-30 15:11       ` Tejun Heo
2026-11-30 16:26         ` Kuba Piecuch
2026-11-25 11:50 ` [RFC PATCH 2/2] selftests/sched_ext: Add immed_strand test Kuba Piecuch

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=20261130111711.2673199-1-jpiecuch@google.com \
    --to=jpiecuch@google.com \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.