Re: [PATCH 12/12] sched_ext: scx_qmap - Add rescue support
Tejun Heo <[email protected]> Sun, 02 Aug 2026 09:51:45 -1000
| Newsgroups | dev.linux.lists.sched-ext,dev.linux.lists.sashiko-reviews |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Aug 01, 2026 at 09:06:02AM +0000, [email protected] wrote: > [Severity: High] > Does removing the !(enq_flags & SCX_ENQ_REENQ) check here cause an > infinite bounce loop when rescue is disabled kernel-side? > > If scx_qmap is executed with -B 0, the kernel capability check rejects the > insert and bounces the task back to ops.enqueue() with the SCX_ENQ_REENQ > flag. > > Without the check for SCX_ENQ_REENQ, qmap_enqueue() will immediately hit > this condition again and force-insert the task back to the target CPU. > > Could this lead to an endless, unthrottled loop that locks up the core? The loop is bounded. Each bounce goes back through scx_do_enqueue_task() which counts it in p->scx.reenq_cnt, and crossing SCX_REENQ_MAX_REPEAT ejects the owning scheduler. With -B 0, a stranded task takes down qmap instead of starving or burning the CPU, which is the intended failure mode when rescue is turned off. Thanks. -- tejun