Re: [PATCH] freezer,sched: Rewrite core freezer logic

From: Peter Zijlstra
Date: Tue Jun 15 2021 - 17:36:12 EST


On Tue, Jun 15, 2021 at 05:45:39PM +0200, Oleg Nesterov wrote:

> But this reminds me... can't we implement selective wakeups? So that if a
> task T sleeps in state = STOPPED | FROZEN, then ttwu(T, FROZEN) won't wake
> it up, it will only clear FROZEN from T->state. Similarly, ttwu(T, STOPPED)
> will leave this task with state == FROZEN.

All this started because I didn't want to touch the wakeup path for
freezing :/

> See also
>
> https://lore.kernel.org/lkml/20131112162136.GA29065@xxxxxxxxxx/
> https://lore.kernel.org/lkml/20131113170724.GA17739@xxxxxxxxxx/
>
> just to remind you that we already discussed TASK_FROZEN a little bit almost
> 10 years ago ;)
>
> What has been shall be, and what has been done is what will be done, and
> there is nothing new under the sun.

Ha!, I had completely forgotten.