All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: sashiko-bot@kernel.org, sched-ext@lists.linux.dev
Subject: Re: [PATCH 13/18] sched_ext: Fix bypassed tasks stalling when the host lacks SCX_CAP_BASE
Date: Tue, 27 Oct 2026 04:08:59 -1000	[thread overview]
Message-ID: <4e5cef40129723ce203194f7a637b0d0@kernel.org> (raw)
In-Reply-To: <sashiko-outbox-185966@kernel.org>

Hello,

On Tue, Oct 27, 2026 at 12:44:18AM +0000, sashiko-bot@kernel.org wrote:
> [Severity: High]
> When bypass_enq_target_dsq() resolves p against host via
> scx_resolve_local_dsq(), p is placed on rq->scx.rescue.dsq or admitted to
> rq->scx.local_dsq, whereas scx_task_sched(p) remains the bypassing child sch
...
> Should scx_rescue_charge() and check_rq_for_timeouts() attribute a bypassed
> task's rescue usage and stall timeouts to scx_exec_sched(sch, cpu_of(rq))?

The host is responsible for running these tasks at that point and is the
one without the needed caps. Fixed by "[PATCH 20/18] sched_ext: Fix the
rescue overload pick ejecting the wrong sub under bypass", posted in
this thread, which charges the rescue time to the host.

The stall attribution is fixed by "sched_ext: Fix the stall watchdog
testing and blaming the wrong sched under bypass", now in
sched_ext/for-7.4-fixes as 93b1512ca69f. The watchdog tests and blames
the sched running the task, which is the host while the owner bypasses.

> [Severity: High]
> What happens if a running SCX_TASK_NONE rescuee leaves its bypassing parent
> without changing scheduler class, such as via scx_sub_disable() ->
> scx_rehome_task(), scx_cgroup_task_migrated() -> scx_rehome_task(), or
> another scx_fail_parent() -> scx_punt_task()?
...
> Should __scx_disable_and_exit_task() also call scx_task_slice_ended() and
> scx_set_task_slice(p, 0) when p is in SCX_TASK_NONE?

Right. Fixed by "[PATCH 19/18] sched_ext: Fix use-after-free of a NONE
rescuee leaving its sched while running", posted in this thread. Leaving
a sched's control now resets the task's fields, a re-home and the exit
of a NONE task included.

Thanks.

--
tejun

  reply	other threads:[~2026-10-27 14:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27  0:17 [PATCHSET v4 sched_ext/for-7.4-fixes] sched_ext: Fix bypassed sub-scheduler tasks stalling when the host lacks caps Tejun Heo
2026-10-27  0:17 ` [PATCH 01/18] sched_ext: Pack scx_ent_flags' multi-bit fields at the top Tejun Heo
2026-10-27  0:17 ` [PATCH 02/18] sched_ext: Clear holding_cpu where the claim is confirmed Tejun Heo
2026-10-27  0:17 ` [PATCH 03/18] sched_ext: Fix bypassed tasks stranded by the reenqueue limit Tejun Heo
2026-10-27  0:17 ` [PATCH 04/18] sched_ext: Fix bypassed tasks looping on a host without SCX_CAP_ENQ Tejun Heo
2026-10-27  0:17 ` [PATCH 05/18] sched_ext: Move refill_task_slice_dfl() below apply_slice_vtime() Tejun Heo
2026-10-27  0:17 ` [PATCH 06/18] sched_ext: Fix rescue served time disagreeing with the slice under proxy execution Tejun Heo
2026-10-27  0:17 ` [PATCH 07/18] sched_ext: Restore a rescuee's slice after ops.stopping() Tejun Heo
2026-10-27  0:17 ` [PATCH 08/18] sched_ext: Fix a cpu idling with a runnable rescuee Tejun Heo
2026-10-27  0:34   ` sashiko-bot
2026-10-27 14:08     ` Tejun Heo
2026-10-27  0:17 ` [PATCH 09/18] sched_ext: Mark the rescue grant as a kernel slice with SCX_TASK_KERNEL_SLICE Tejun Heo
2026-10-27  0:17 ` [PATCH 10/18] sched_ext: Refuse extending a kernel slice Tejun Heo
2026-10-27  0:17 ` [PATCH 11/18] sched_ext: Fix a cpu idling after put_prev_task_scx() queues its task on the local DSQ Tejun Heo
2026-10-27  0:17 ` [PATCH 12/18] sched_ext: Expire prev's slice in dispatch_one() under bypass Tejun Heo
2026-10-27  0:17 ` [PATCH 13/18] sched_ext: Fix bypassed tasks stalling when the host lacks SCX_CAP_BASE Tejun Heo
2026-10-27  0:44   ` sashiko-bot
2026-10-27 14:08     ` Tejun Heo [this message]
2026-10-27  0:17 ` [PATCH 14/18] sched_ext: Fix the bypass load balancer stranding tasks on cpus where " Tejun Heo
2026-10-27  0:17 ` [PATCH 15/18] sched_ext: Factor out bypass_lb_move() and insert with the donor DSQ unlocked Tejun Heo
2026-10-27  0:17 ` [PATCH 16/18] sched_ext: Let the bypass load balancer move tasks homed on other cpus Tejun Heo
2026-10-27  0:17 ` [PATCH 17/18] sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE Tejun Heo
2026-10-27  0:17 ` [PATCH 18/18] sched_ext: Fix a lone IMMED task waiting behind a kept prev Tejun Heo
2026-10-27 14:08 ` [PATCH 19/18] sched_ext: Fix use-after-free of a NONE rescuee leaving its sched while running Tejun Heo
2026-10-27 14:08 ` [PATCH 20/18] sched_ext: Fix the rescue overload pick ejecting the wrong sub under bypass Tejun Heo
2026-10-27 19:11 ` [PATCHSET v4 sched_ext/for-7.4-fixes] sched_ext: Fix bypassed sub-scheduler tasks stalling when the host lacks caps Tejun Heo
2026-10-27 19:28 ` 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=4e5cef40129723ce203194f7a637b0d0@kernel.org \
    --to=tj@kernel.org \
    --cc=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sched-ext@lists.linux.dev \
    /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.