Re: [RFC PATCH 00/16][PoC] sched/core: Alternate approach to sleeping-owner handling in PROXY_EXEC
From: K Prateek Nayak
Date: Thu Sep 17 2026 - 01:22:24 EST
Hello John,
On 9/16/2026 11:27 PM, John Stultz wrote:
> On Tue, Sep 15, 2026 at 10:22 PM John Stultz <jstultz@xxxxxxxxxx> wrote:
>> The series definitely looks interesting, and it seems to be holding up
>> ok in testing. Though figuring out how to refactor them so that they
>
> Well, I did hit the following last night during stress testing:
>
> [11176.672951] WARNING: kernel/sched/sched.h:1645 at
> sched_change_begin+0x1b6/0x2b0, CPU#14: torture_shuffle/433
> [11176.676650] CPU: 14 UID: 0 PID: 433 Comm: torture_shuffle Not
> tainted 7.2.0-rc4-00032-gf14e36dcc837-dirty #138 PREEMPT(full)
> [11176.680917] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
> BIOS 1.17.0-debian-1.17.0-1 04/01/2014
> [11176.684794] RIP: 0010:sched_change_begin+0x1b6/0x2b0
> [11176.686748] Code: c9 1e 48 89 03 80 7b 1c 00 0f 85 ca 00 00 00 80
> 7b 1d 00 0f 85 91 00 00 00 48 89 d8 5b 5d 41 5c 41 5d 41 5e e9 1b 63
> 23 01 90 <0f> 0b 90 41 f6 c5 08 0f 85 c7 fe ff ff 48 89 ef 41 83 cd 08
> e8 b1
> [11176.693913] RSP: 0018:ffffc900010b3e10 EFLAGS: 00010046
> [11176.695962] RAX: 0000000000000000 RBX: ffff8881b9198020 RCX: 0000000000000001
> [11176.698747] RDX: 0000000000000001 RSI: ffffffff82c8b519 RDI: ffffffff82cad7fe
> [11176.701554] RBP: ffff8881b91abdc0 R08: 0000000000000001 R09: 00000000d19ffe29
> [11176.704561] R10: 000000000000000e R11: ffff88810264cff0 R12: ffff888106694400
> [11176.707423] R13: 0000000000000002 R14: 0000000000000000 R15: ffffc90000017d58
> [11176.710161] FS: 0000000000000000(0000) GS:ffff88823563e000(0000)
> knlGS:0000000000000000
> [11176.713196] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [11176.715628] CR2: 0000000000000000 CR3: 00000001072a7006 CR4: 0000000000370ef0
> [11176.718462] Call Trace:
> [11176.719460] <TASK>
> [11176.720319] __set_cpus_allowed_ptr_locked+0x146/0x1f0
> [11176.722343] ? __pfx_torture_shuffle+0x10/0x10
> [11176.724063] __set_cpus_allowed_ptr+0x64/0xa0
> [11176.725913] set_cpus_allowed_ptr+0x3a/0x60
> [11176.727513] torture_shuffle+0x12b/0x230
> [11176.729014] kthread+0x103/0x130
> [11176.730304] ? __pfx_kthread+0x10/0x10
> [11176.731758] ret_from_fork+0x27c/0x340
> [11176.733220] ? __pfx_kthread+0x10/0x10
> [11176.734680] ret_from_fork_asm+0x1a/0x30
> [11176.736366] </TASK>
>
> Followed shortly after by:
> [11663.223681] kernel BUG at kernel/sched/rt.c:1020!
> [11663.226093] Oops: invalid opcode: 0000 [#1] SMP NOPTI
> [11663.228669] CPU: 46 UID: 0 PID: 0 Comm: swapper/46 Tainted: G
> W 7.2.0-rc4-00032-gf14e36dcc837-dirty #138 PREEMPT(full)
> [11663.234796] Tainted: [W]=WARN
> [11663.236392] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
> BIOS 1.17.0-debian-1.17.0-1 04/01/2014
> [11663.241196] RIP: 0010:dequeue_rt_stack+0x2ad/0x2c0
> [11663.243652] Code: 83 a8 fe ff ff 39 c1 0f 8e 47 ff ff ff 90 0f 0b
> 90 e9 b7 fd ff ff 90 0f 0b 90 e9 e8 fd ff ff f3 48 0f bc d0 e9 80 fe
> ff ff 90 <0f> 0b 48 8d 3d 1a 79 dc 01 67 48 0f b9 3a e9 e9 fe ff ff 90
> 90 90
> [11663.253981] RSP: 0018:ffffc90000c10dd8 EFLAGS: 00010046
> [11663.256630] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88810ad50080
> [11663.260225] RDX: ffff888235e3e000 RSI: 0000000000000000 RDI: ffff88810ad501c0
> [11663.263862] RBP: ffff8881b99abdc0 R08: 0000000000000000 R09: ffffffff83b9a280
> [11663.266876] R10: 000000000000002e R11: 0000000000000000 R12: ffff8881b99abdc0
> [11663.269626] R13: ffff88810ad501c0 R14: 0000000000000000 R15: 0000000000000025
> [11663.272412] FS: 0000000000000000(0000) GS:ffff888235e3e000(0000)
> knlGS:0000000000000000
> [11663.276347] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [11663.279185] CR2: 00007f03955d60ac CR3: 00000001072a7006 CR4: 0000000000370ef0
> [11663.282698] Call Trace:
> [11663.284061] <IRQ>
> [11663.285116] enqueue_task_rt+0x77/0x3f0
> [11663.287276] enqueue_task+0x1cf/0x330
> [11663.289121] proxy_activate_blocked_task+0x498/0x640
> [11663.291579] ttwu_do_activate+0x287/0x290
> [11663.293582] sched_ttwu_pending+0x10b/0x220
> [11663.295726] __flush_smp_call_function_queue+0x1f8/0x680
> [11663.298320] __sysvec_call_function_single+0x35/0x180
> [11663.300877] sysvec_call_function_single+0x8a/0xb0
> [11663.303287] </IRQ>
> [11663.304376] <TASK>
> [11663.305467] asm_sysvec_call_function_single+0x1a/0x20
> [11663.307994] RIP: 0010:pv_native_safe_halt+0xf/0x20
>
>
> The only change I made to your tree was passing the rf into
> proxy_activate_blocked_task, to use rq_(un)lock() instead of
> raw_spin_rq_(un)lock().
Thank you for testing and the report! Let me go find what I've
broken.
--
Thanks and Regards,
Prateek