mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Andrea Righi <arighi@nvidia.com>
Cc: David Vernet <void@manifault.com>,
	Changwoo Min <changwoo@igalia.com>,
	Emil Tsalapatis <emil@etsalapatis.com>,
	sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] sched_ext: Don't leave the kick_sync wait queued across a core-sched pick
Date: Sat, 17 Oct 2026 12:44:43 -1000	[thread overview]
Message-ID: <feaffac58ebad408885c8adae931ab27@kernel.org> (raw)
In-Reply-To: <20261017202025.3834954-3-arighi@nvidia.com>

Hello, Andrea.

On Sat, Oct 17, 2026 at 10:05:15PM +0200, Andrea Righi wrote:
> +	kick_sync_queued = dequeue_balance_callback(this_rq, &this_rq->scx.kick_sync_bal_cb);

Instead of taking the callback off around each dispatch, can we queue it
from set_next_task_scx() on SNT_PICK and SNT_REPICK?
put_prev_set_next_task() calls it once the pick is final, after the
core-wide selection, so the rq lock can't be dropped with the callback
queued. If the CPU ends up running idle or a higher class task, no SCX task
runs there and there's nothing to wait for. kick_sync_pending stays set and
the next pick of an SCX task waits before running it.

SNT_REPICK came with c72945693b90 ("sched: Restart fair hrtick after
same-task repicks"), which is only in for-7.4, so let's do this there and
tag it as a stable dependency:

  Cc: stable@vger.kernel.org # v7.0+: c72945693b90: sched: Restart fair hrtick after same-task repicks
  Cc: stable@vger.kernel.org # v7.0+

Also, proxy exec on for-7.4 zaps balance callbacks and picks again when
find_proxy_task() fails, so kick_sync_pending should be cleared when the
callback runs rather than when it's queued.

Thanks.

--
tejun

      reply	other threads:[~2026-10-17 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-17 20:05 [PATCHSET sched_ext/for-7.3-fixes] sched_ext: Fix scx balance callbacks " Andrea Righi
2026-10-17 20:05 ` [PATCH 1/2] sched_ext: Don't queue balance callbacks from " Andrea Righi
2026-10-17 22:14   ` Tejun Heo
2026-10-17 20:05 ` [PATCH 2/2] sched_ext: Don't leave the kick_sync wait queued across " Andrea Righi
2026-10-17 22:44   ` Tejun Heo [this message]

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=feaffac58ebad408885c8adae931ab27@kernel.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=emil@etsalapatis.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

all inboxes | Powered by JetHome®