Sched_ext development
 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/17] sched_ext: Fix bypassed tasks stalling when the host lacks SCX_CAP_BASE
Date: Fri, 23 Oct 2026 10:06:48 -1000	[thread overview]
Message-ID: <6373f2a93140aa91dd857e28058b7777@kernel.org> (raw)
In-Reply-To: <sashiko-outbox-183097@kernel.org>

Hello,

On Fri, Oct 23, 2026 at 07:02:35PM +0000, sashiko-bot@kernel.org wrote:
> [Severity: High]
> When bypass_enq_target_dsq() diverts a bypassed task p owned by sch into
> rescue on behalf of host = scx_exec_sched(sch, cpu_of(rq)), can rescue
> overload accounting and watchdog stall attribution still blame sch instead of
> host?
...
> Since host has no rescue_avg charged for those bypassed tasks, won't
> scx_rescue_check_overload() either fail to find a victim and leave host
> unejected, or eject an unrelated sub-scheduler on that CPU?

The overload ejection not working while the owner exits is fine. Left as
is.

> If sch is already exiting, __scx_exit() becomes a no-op via scx_claim_exit()
> while timed_out = true stops both the rq scan and scx_watchdog_workfn()'s
> CPU scan without ejecting host. Should scx_rescue_charge() and
> check_rq_for_timeouts() resolve through scx_exec_sched() when the task's
> scheduler is bypassing on that CPU?

The watchdog taking no action is a problem. If the parent isn't processing
the bypassed tasks right, the child may not be able to exit. Fixed by
"[PATCH 19/17] sched_ext: Fix the stall watchdog blaming a bypassing owner
for a stuck task", posted in this thread, which blames the host for a stuck
task whose owner is bypassing.

> [Severity: Critical]
> Can admitting a bypassed task into rescue here also leave a dangling
> rq->scx.rescue.curr pointer if the task is in state SCX_TASK_NONE?

Right. Fixed by "[PATCH 18/17] sched_ext: Fix use-after-free of a NONE
rescuee leaving sched_ext", also in this thread. switched_from_scx() now
ends the slice for a NONE task.

Thanks.

--
tejun

  reply	other threads:[~2026-10-23 20:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 17:55 [PATCHSET v3 sched_ext/for-7.4] sched_ext: Fix bypassed sub-scheduler tasks stalling when the host lacks caps Tejun Heo
2026-10-23 17:55 ` [PATCH 01/17] sched_ext: Pack scx_ent_flags' multi-bit fields at the top Tejun Heo
2026-10-23 17:55 ` [PATCH 02/17] sched_ext: Clear holding_cpu where the claim is confirmed Tejun Heo
2026-10-23 17:55 ` [PATCH 03/17] sched_ext: Fix bypassed tasks stranded by the reenqueue limit Tejun Heo
2026-10-23 17:55 ` [PATCH 04/17] sched_ext: Fix bypassed tasks looping on a host without SCX_CAP_ENQ Tejun Heo
2026-10-23 18:50   ` sashiko-bot
2026-10-23 19:08     ` Tejun Heo
2026-10-23 17:55 ` [PATCH 05/17] sched_ext: Move refill_task_slice_dfl() below apply_slice_vtime() Tejun Heo
2026-10-23 17:55 ` [PATCH 06/17] sched_ext: Fix rescue served time disagreeing with the slice under proxy execution Tejun Heo
2026-10-23 17:55 ` [PATCH 07/17] sched_ext: Restore a rescuee's slice after ops.stopping() Tejun Heo
2026-10-23 17:55 ` [PATCH 08/17] sched_ext: Fix a cpu idling with a runnable rescuee Tejun Heo
2026-10-23 17:56 ` [PATCH 09/17] sched_ext: Mark the rescue grant as a kernel slice with SCX_TASK_KERNEL_SLICE Tejun Heo
2026-10-23 17:56 ` [PATCH 10/17] sched_ext: Refuse extending a kernel slice Tejun Heo
2026-10-23 17:56 ` [PATCH 11/17] sched_ext: Fix a cpu idling after put_prev_task_scx() queues its task on the local DSQ Tejun Heo
2026-10-23 17:56 ` [PATCH 12/17] sched_ext: Expire prev's slice in dispatch_one() under bypass Tejun Heo
2026-10-23 17:56 ` [PATCH 13/17] sched_ext: Fix bypassed tasks stalling when the host lacks SCX_CAP_BASE Tejun Heo
2026-10-23 19:02   ` sashiko-bot
2026-10-23 20:06     ` Tejun Heo [this message]
2026-10-23 17:56 ` [PATCH 14/17] sched_ext: Fix the bypass load balancer stranding tasks on cpus where " Tejun Heo
2026-10-23 17:56 ` [PATCH 15/17] sched_ext: Factor out bypass_lb_move() and insert with the donor DSQ unlocked Tejun Heo
2026-10-23 17:56 ` [PATCH 16/17] sched_ext: Let the bypass load balancer move tasks homed on other cpus Tejun Heo
2026-10-23 17:56 ` [PATCH 17/17] sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE Tejun Heo
2026-10-25 15:47   ` Andrea Righi
2026-10-26 21:31     ` Tejun Heo
2026-10-23 20:06 ` [PATCH 18/17] sched_ext: Fix use-after-free of a NONE rescuee leaving sched_ext Tejun Heo
2026-10-23 20:06 ` [PATCH 19/17] sched_ext: Fix the stall watchdog blaming a bypassing owner for a stuck task Tejun Heo
2026-10-25 15:52   ` Andrea Righi
2026-10-26 21:31     ` Tejun Heo
2026-10-23 20:10 ` [PATCH 20/17] sched_ext: Fix a lone IMMED task waiting behind a kept prev Tejun Heo

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=6373f2a93140aa91dd857e28058b7777@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox