Re: [PATCH] sched/fair: Add null pointer check to pick_next_entity()
From: Rik van Riel
Date: Wed Apr 16 2025 - 10:26:23 EST
On Wed, 2025-04-16 at 14:44 +0200, Peter Zijlstra wrote:
> On Tue, Apr 15, 2025 at 10:02:35AM +0200, Peter Zijlstra wrote:
> > On Mon, Apr 14, 2025 at 03:57:42PM -0400, Rik van Riel wrote:
> > > On Wed, 2025-04-02 at 10:22 +0200, Peter Zijlstra wrote:
> > > >
> > > > Please confirm what the reason for overflow is.
> > > >
> > > Running a large enough sample size has its benefits.
> > >
> > > We have hit 3 out of the 4 warnings below.
> > >
> > > The only one we did not hit is the cfs_rq->avg_load != avg_load
> > > warning.
> >
> > Fair enough, that one really isn't hard.
> >
> > > Most of the time we seem to hit the warnings from the
> > > code that removes tasks from the runqueue,
> >
> > *blink*..
>
> Which warning is getting hit on removal? The avg_vruntime mismatch?
>
> Also, which removal path? schedule()'s block path, or migration like?
The most common warning by far, hitting
about 90% of the time we hit anything
in avg_vruntime_validate is the
WARN_ON_ONCE(cfs_rq->avg_vruntime != vruntime)
The most common code path to getting there,
covering about 85% of the cases:
avg_vruntime_validate
avg_vruntime_sub
__dequeue_entity
set_next_entity
pick_task_fair
pick_next_task_fair
__pick_next_task
pick_next_task
__schedule
schedule
--
All Rights Reversed.