Re: sched: wakeup setting TIF_NEED_RESCHED too frequently
From: Jörn Engel
Date: Wed Apr 28 2021 - 14:52:04 EST
On Wed, Apr 28, 2021 at 10:30:05AM +0200, Peter Zijlstra wrote:
>
> set_nr_if_polling() only sets TIF_NEED_RESCHED IFF TIF_POLLING_NRFLAG is
> set. TIF_POLLING_NRFLAG is only set when idle and is then sufficient to
> wake that cpu and reschedule.
>
> If not TIF_POLLING_NRFLAG, then we send an IPI to deal with the
> non-empty wake_list.
Yeah, saw that myself. My explanation of the behaviour is wrong. The
observed behaviour remains, though.
Guess I have to add more instrumentation if I cannot find the cause by
reading the code.
Thank you!
Jörn
--
Optimizations always bust things, because all optimizations are, in
the long haul, a form of cheating, and cheaters eventually get caught.
-- Larry Wall