From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Peter Zijlstra <peterz@infradead.org>, <mingo@kernel.org>
Cc: <juri.lelli@redhat.com>, <vincent.guittot@linaro.org>,
<dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
<bsegall@google.com>, <mgorman@suse.de>, <vschneid@redhat.com>,
<linux-kernel@vger.kernel.org>, <wangtao554@huawei.com>,
<quzicheng@huawei.com>, <wuyun.abel@bytedance.com>,
<dsmythies@telus.net>
Subject: Re: [PATCH 0/4] sched: Various reweight_entity() fixes
Date: Tue, 3 Feb 2026 12:15:56 +0530 [thread overview]
Message-ID: <4c48fe59-8ff3-41fb-83cb-869409f6fbc6@amd.com> (raw)
In-Reply-To: <20260130093439.803225718@infradead.org>
Hello Peter,
On 1/30/2026 3:04 PM, Peter Zijlstra wrote:
> Two issues related to reweight_entity() were raised; poking at all that got me
> these patches.
>
> They're in queue.git/sched/core and I spend most of yesterday staring at traces
> trying to find anything wrong. So far, so good.
>
> Please test.
I put this on top of tip:sched/urgent + tip:sched/core which contains Ingo's
cleanup of removing the union and at some point in the benchmark run I hit:
BUG: kernel NULL pointer dereference, address: 0000000000000051
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD c153802067 P4D c1750e7067 PUD c16067e067 PMD 0
Oops: Oops: 0000 [#1] SMP NOPTI
CPU: 200 UID: 1000 PID: 92850 Comm: schbench Not tainted 6.19.0-rc6-peterz-eevdf-fix+ #4 PREEMPT(full)
Hardware name: ... (Zen4c server)
RIP: 0010:pick_task_fair+0x3c/0x130
Code: ...
RSP: 0000:ff5cc03f25ecfd58 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ff3087d6eb032380 RCX: 00000000056ae402
RDX: fffe78b16a6ed620 RSI: fffe790e92f4c046 RDI: 00027caa24e6c3ee
RBP: 0000000000000000 R08: 0000000000000002 R09: 0000000000000002
R10: 0000086bfb248f00 R11: 0000000000000438 R12: ff3087d6eb032480
R13: ff5cc03f25ecfea0 R14: ff3087d6eb032380 R15: ff3087d6eb032380
FS: 00007f176438a640(0000) GS:ff3087d73d0e2000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000051 CR3: 000000c0d275c048 CR4: 0000000000f71ef0
PKRU: 55555554
Call Trace:
<TASK>
pick_next_task_fair+0x46/0x7b0
? task_tick_fair+0xf1/0x8b0
? perf_event_task_tick+0x5e/0xc0
__pick_next_task+0x41/0x1d0
__schedule+0x26e/0x17a0
? srso_alias_return_thunk+0x5/0xfbef5
? timerqueue_add+0x9f/0xc0
? __hrtimer_run_queues+0x139/0x240
? ktime_get+0x3f/0xf0
? srso_alias_return_thunk+0x5/0xfbef5
? srso_alias_return_thunk+0x5/0xfbef5
? srso_alias_return_thunk+0x5/0xfbef5
? clockevents_program_event+0xaa/0x100
schedule+0x27/0xd0
irqentry_exit+0x2a8/0x610
? srso_alias_return_thunk+0x5/0xfbef5
? __irq_exit_rcu+0x3f/0xf0
asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0033:0x7f17f2498e58
Code: ...
RSP: 002b:00007f1764389d48 EFLAGS: 00000202
RAX: 0000000000000010 RBX: 00000000000000c8 RCX: 00007f17f24e57f8
RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000014cd2820
RBP: 0000000014cd2820 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 00007f1764389e00
R13: 00007f176439fed0 R14: 0000000000002a40 R15: 00007f17b414c778
</TASK>
Modules linked in: ...
CR2: 0000000000000051
---[ end trace 0000000000000000 ]---
RIP points to "se->sched_delayed" dereference in pick_task_fair():
$ scripts/faddr2line vmlinux pick_task_fair+0x3c/0x130
pick_task_fair+0x3c/0x130:
pick_next_entity at kernel/sched/fair.c:5648
(inlined by) pick_task_fair at kernel/sched/fair.c:9061
$ sed -n '5645,5651p' kernel/sched/fair.c
struct sched_entity *se;
se = pick_eevdf(cfs_rq);
if (se->sched_delayed) {
dequeue_entities(rq, se, DEQUEUE_SLEEP | DEQUEUE_DELAYED);
/*
* Must not reference @se again, see __block_task().
so something went sideways with the avg_vruntime calculation I presume.
I'm rerunning with the PARANOID_AVG feat now.
Just re-running the particular schbench variant hasn't crashed the kernel
in the half hour it has been running so I've re-triggered the same set of
benchmarks to see if flipping PARANOID_AVG makes any difference.
If you have a debug patch somewhere that you would like data on this run
from, please do let me know, else I plan on capturing the rq state at
the time of crash (cfs_rq walk, dumping all the vruntimes of all the
queued entities).
--
Thanks and Regards,
Prateek
next prev parent reply other threads:[~2026-02-03 6:46 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 9:34 Peter Zijlstra
2026-01-30 9:34 ` [PATCH 1/4] sched/fair: Only set slice protection at pick time Peter Zijlstra
2026-01-30 15:52 ` Vincent Guittot
2026-01-30 9:34 ` [PATCH 2/4] sched/eevdf: Update se->vprot in reweight_entity() Peter Zijlstra
2026-01-30 16:20 ` Vincent Guittot
2026-01-30 9:34 ` [PATCH 3/4] sched/fair: Increase weight bits for avg_vruntime Peter Zijlstra
2026-01-30 9:34 ` [PATCH 4/4] sched/fair: Revert 6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing scheduling lag") Peter Zijlstra
2026-01-31 1:47 ` Zhang Qiao
2026-01-31 15:21 ` Peter Zijlstra
2026-02-02 9:12 ` Peter Zijlstra
2026-02-02 9:24 ` Peter Zijlstra
2026-02-02 11:23 ` Zhang Qiao
2026-02-01 17:13 ` [PATCH 0/4] sched: Various reweight_entity() fixes Doug Smythies
2026-02-03 6:45 ` K Prateek Nayak [this message]
2026-02-03 11:11 ` Peter Zijlstra
2026-02-03 12:19 ` K Prateek Nayak
2026-02-03 16:36 ` Doug Smythies
2026-02-10 18:13 ` Peter Zijlstra
2026-02-11 5:51 ` Doug Smythies
2026-02-04 10:15 ` K Prateek Nayak
2026-02-09 15:47 ` Peter Zijlstra
2026-02-09 16:52 ` K Prateek Nayak
2026-02-10 5:16 ` K Prateek Nayak
2026-02-10 10:29 ` Peter Zijlstra
2026-02-10 15:41 ` Doug Smythies
2026-02-10 18:09 ` K Prateek Nayak
2026-02-10 18:35 ` Peter Zijlstra
2026-02-10 20:04 ` K Prateek Nayak
2026-02-11 6:28 ` K Prateek Nayak
2026-02-11 8:50 ` K Prateek Nayak
2026-02-11 23:09 ` Doug Smythies
2026-02-10 18:52 ` Peter Zijlstra
2026-02-10 20:52 ` Vincent Guittot
2026-02-11 5:21 ` Doug Smythies
2026-02-11 8:49 ` Vincent Guittot
2026-02-11 9:01 ` Peter Zijlstra
2026-02-11 10:48 ` Peter Zijlstra
2026-02-11 10:49 ` Peter Zijlstra
2026-02-11 11:15 ` Vincent Guittot
2026-02-11 16:28 ` Peter Zijlstra
2026-02-12 7:43 ` K Prateek Nayak
2026-02-12 11:59 ` Peter Zijlstra
2026-02-12 17:16 ` Peter Zijlstra
2026-02-12 17:24 ` Vincent Guittot
2026-02-12 19:31 ` Peter Zijlstra
2026-02-13 5:22 ` K Prateek Nayak
2026-02-13 6:44 ` Peter Zijlstra
2026-02-13 10:50 ` Peter Zijlstra
2026-02-13 14:29 ` K Prateek Nayak
2026-02-14 6:31 ` Doug Smythies
2026-02-21 22:51 ` Doug Smythies
2026-02-12 19:29 ` Peter Zijlstra
2026-02-12 19:37 ` Doug Smythies
2026-02-13 6:04 ` K Prateek Nayak
2026-02-11 16:21 ` Peter Zijlstra
2026-02-12 5:54 ` Doug Smythies
2026-02-12 7:51 ` Peter Zijlstra
2026-02-12 15:47 ` Doug Smythies
2026-02-12 7:46 ` Peter Zijlstra
2026-02-11 23:25 ` Doug Smythies
2026-02-11 8:48 ` Peter Zijlstra
2026-02-04 10:44 ` Peter Zijlstra
2026-02-14 7:20 ` Shubhang Kaushik
2026-02-16 3:14 ` K Prateek Nayak
2026-02-16 10:59 ` Dietmar Eggemann
2026-02-17 14:37 ` Dietmar Eggemann
2026-02-17 22:02 ` Shubhang Kaushik
2026-02-17 4:20 ` K Prateek Nayak
2026-02-18 18:37 ` Shubhang Kaushik
2026-02-19 7:53 ` Peter Zijlstra
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=4c48fe59-8ff3-41fb-83cb-869409f6fbc6@amd.com \
--to=kprateek.nayak@amd.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=dsmythies@telus.net \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=quzicheng@huawei.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=wangtao554@huawei.com \
--cc=wuyun.abel@bytedance.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
Powered by JetHome