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

From: Pavel Machek
Date: Tue Dec 04 2018 - 14:43:01 EST


On Tue 2018-12-04 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?
>
> 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 ...

pavel@amd:~$ wtf til
Gee... I don't know what til means...
?

> 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?

Not really.

> Because in practice losing power due to failed freezing *will* result in
> data loss, in about 90% of the time ...

Ugh. What are you talking about?

I don't know how you use your machines, but 95% of s2ram's I do,
machines are running on AC power, and I'll notice that freezer
failure, because the machine keeps making noise when it should be
sleeping.

There's big difference between "sync; forced_poweroff" and
"forced_poweroff", which are annoying but quite harmless (editors keep
backups, web browser stores session periodically, and filesystems have
journal...) and real data corruption as in "Pavel found another bug in
fsck.ext3, which is great, but his filesystem is corrupted, which is
not so great".

(BTW one of those bugs is unfixable; I managed to corrupt ext3 in such
a way that fsck is not able to automatically repair it, and likely
never will be. Fun?)

> So I don't even know what we are trying to protect against by refusing to
> freeze - avoiding a 0.001% data loss risk against a 90% data loss risk?

Where did you get those 0.001% and 90% numbers?

I don't see freezer failures too often.

I see machine that is sleeping, but fails to resume, maybe once in
month. That's "sync; forced_poweroff" type failure. Not nice,
but... Unfortunately fairly hard to debug. And not worse than usual
"hard crashes" I see at about same frequency.

I did have real filesystem corruption, at least twice while debugging
hibernation. Trust me. You don't want to have that, and you certainly
don't want your users to have that.

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature