Re: [PATCH] Revert "exec: make de_thread() freezable (was: Re: Linux 4.20-rc4)

From: Michal Hocko
Date: Tue Dec 04 2018 - 04:58:11 EST


On Tue 04-12-18 10:33:10, Ingo Molnar wrote:
>
> * Michal Hocko <mhocko@xxxxxxxxxx> wrote:
>
> > I dunno. I do not use hibernation. I am a heavy user of the suspend
> > though. I s2ram all the time. And I have certainly experienced cases
> > where suspend has failed and I onlyi found out later when I've picked
> > up my laptop from my heat up bag. Nothing fatal has resulted from that
> > but this is certainly annoying.
>
> Hm, so I (mistakenly) thought freezing was mostly limited to hibernation
> and to a few weird cases when in flight DMA must not be suspended - but
> I'm wrong and in practice we always freeze tasks during s2ram, right?

Yup.

> And indeed:
>
> config SUSPEND_FREEZER
> bool "Enable freezer for suspend to RAM/standby" \
> if ARCH_WANTS_FREEZER_CONTROL || BROKEN
> depends on SUSPEND
> default y
>
> which is essentially always enabled on x86.
>
> TIL ...
>
> s2ram is obviously a huge deal.
>
> Just a newbie question: any chance to not do any freezing at all on
> modern laptops when doing s2ram, or at least only warn if it fails and
> try to suspend?

AFAIU both suspend and hibernation require the system to enter quiescent
state with no task potentially interfering with suspended devices. And
in this particular case those de-thread-ed threads will certainly not
interfere so silencing the lockdep sounds like a reasonable workaround.
--
Michal Hocko
SUSE Labs