Re: [linux-pm] [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
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux