[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191107153848.GA31774@google.com>
Date: Thu, 7 Nov 2019 15:38:48 +0000
From: Quentin Perret <qperret@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Kirill Tkhai <ktkhai@...tuozzo.com>, linux-kernel@...r.kernel.org,
aaron.lwe@...il.com, valentin.schneider@....com, mingo@...nel.org,
pauld@...hat.com, jdesfossez@...italocean.com,
naravamudan@...italocean.com, vincent.guittot@...aro.org,
dietmar.eggemann@....com, juri.lelli@...hat.com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
kernel-team@...roid.com, john.stultz@...aro.org
Subject: Re: NULL pointer dereference in pick_next_task_fair
On Thursday 07 Nov 2019 at 14:26:28 (+0100), Peter Zijlstra wrote:
> Given that we're stuck with this order, the only solution is fixing
> the 'change' pattern. The simplest fix seems to be to 'absuse'
> p->on_cpu to carry more state. Adding more state to p->on_rq is
> possible but is far more invasive and also ends up duplicating much of
> the state we already carry in p->on_cpu.
I think there is another solution, which is to 'de-factorize' the call
to put_prev_task() (that is, have each class do it). I gave it a go and
I basically end up with something equivalent to reverting 67692435c411
("sched: Rework pick_next_task() slow-path"), which isn't the worst
solution IMO. I'm thinking at least we should consider it.
Now, 67692435c411 _is_ a nice clean-up, it's just a shame that the fix
on top isn't as nice (IMO). It might just be a matter of personal taste,
so I don't have a strong opinion on this :)
Thanks,
Quentin
Powered by blists - more mailing lists