Re: [PATCH] sched/fair: Add null pointer check to pick_next_entity()

Chris Mason
2025-04-14T15:39:18Z

On 4/14/25 5:08 AM, Peter Zijlstra wrote:

[ math and such ]

> The zero_vruntime patch I gave earlier should avoid this particular
> issue.

Here's a crash with the zero runtime patch. I'm trying to reproduce
this outside of prod so we can crank up the iteration speed a bit.

-chris

nr_running = 2
zero_vruntime = 19194347104893960
avg_vruntime = 6044054790
avg_load = 2
curr = {
cgroup urgent
vruntime = 24498183812106172
weight = 3561684 => 3478
rq = {
nr_running = 0
zero_vruntime = 505000008215941
avg_vruntime = 0
avg_load = 0
curr = {
cgroup urgent/-610604968056586240
vruntime = 505000008302509
weight = 455902 => 445
rq = {
nr_running = 0
zero_vruntime = 12234709899
avg_vruntime = 0
avg_load = 0
curr = {
task = 279047 (fc0)
vruntime = 12237278090
weight = 15360 => 15
}
tasks_timeline = [
]
}
}
tasks_timeline = [
]
}
}
tasks_timeline = [
{
cgroup optional
vruntime = 19194350126921355
weight = 1168 => 2
rq = {
nr_running = 2
zero_vruntime = 440280059357029
avg_vruntime = 476
avg_load = 688
tasks_timeline = [
{
cgroup optional/-610613050111295488
vruntime = 440280059333960
weight = 291271 => 284
rq = {
nr_running = 5
zero_vruntime = 65179829005
avg_vruntime = 0
avg_load = 75
tasks_timeline = [
{
task = 261672 (fc0)
vruntime = 65189926507
weight = 15360 => 15
},
{
task = 261332 (fc0)
vruntime = 65189480962
weight = 15360 => 15
},
{
task = 261329 (enc1:0:vp9_fbv)
vruntime = 65165843516
weight = 15360 => 15
},
{
task = 261334 (dec0:0:hevc_fbv)
vruntime = 65174065035
weight = 15360 => 15
},
{
task = 261868 (fc0)
vruntime = 65179829005
weight = 15360 => 15
},
]
}
},
{
cgroup optional/-610609318858457088
vruntime = 440280059373247
weight = 413911 => 404
rq = {
nr_running = 1
zero_vruntime = 22819875784
avg_vruntime = 0
avg_load = 15
tasks_timeline = [
{
task = 273291 (fc0)
vruntime = 22819875784
weight = 15360 => 15
},
]
}
},
]
}
},
]