Re: [RFC] why do we need run disk sync before entering S3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> > > But remember there are even in-kernel s2ram triggers, for example on
> > > zaurus when battery goes critical.
> > > 
> 
> Take ACPI for example, ACPI defines two ACPI battery states, one is
> "low" and another is "critical".
> OS enters S3/S4 when battery is low, while it performs an emergency
> shutdown when battery is in critical state. (ACPI spec 3.0b 3.9.4)
> So I'm wondering if it's right to enter S3 when we know that the system
> may lost power at anytime.

Well, battery only lasts like 30 hours in S3. So if you leave your
notebook unattended for 30 hours, you'll loose recent changes.

> > > (And s2ram without sync _is_ "wrong": writeback timeouts are not
> > > honored).

> any kind of suspend can't meet this requirement. Even sys_sync is
> called, there is a small window that some pages are dirtied, but are not
> synced to disk in max expire interval, right?

Not if you do sys_sync() after freeze of userspace. (I'm not 100% sure
there's no race in there somewhere, but I'd prefer not to make the
race bigger.)
								Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux