From: Nigel Cunningham <ncunningham@crca.org.au>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-acpi <linux-acpi@vger.kernel.org>,
linux-pm@lists.linux-foundation.org
Subject: Re: [RFC] why do we need run disk sync before entering S3
Date: Tue, 19 May 2009 11:03:39 +1000 [thread overview]
Message-ID: <1242695019.10835.127.camel@nigel-laptop> (raw)
In-Reply-To: <200905131003.15199.rjw@sisk.pl>
Hi.
On Wed, 2009-05-13 at 10:03 +0200, Rafael J. Wysocki wrote:
> On Wednesday 13 May 2009, Alan Stern wrote:
> > On Wed, 13 May 2009, Zhang Rui wrote:
> >
> > > Hi, all,
> > >
> > > I did some S3 tests on an eeepc901, the total suspend time(from issue
> > > the suspend command to power down) is about 2.5s~3s.
> > > something interesting is that kernel runs disk sync before entering S3
> > > state, and this takes about 0.7~1.2s.
> > > my question is that, why do we need this for s2ram?
> > > can we remove this and run sys_sync for S4 only?
> >
> > At the risk of sounding foolish, I'd guess that a system in S3 (or more
> > generally, suspend-to-RAM) is a lot more at risk of losing power or
> > failing to restore than a normally running system. (A normally running
> > system is trivially not at risk of failing to restore!) Consequently
> > it makes sense to flush the I/O buffers before entering this state, to
> > minimize the potential for loss of data.
> >
> > When you think about it, a system in S4 is actually _less_ likely to
> > run into trouble than one in S3, since it can't fail because of loss of
> > power. So if anything, we should remove the disk sync from hibernation
> > and leave it in system suspend.
>
> I generally agree, but I think we may also leave the syncing to the user space,
> in both cases.
Sorry for coming into this discussion late - I was unavailable most of
last week.
Another point to remember is that syncing from userspace will not be
guaranteed to stop data loss. To be sure that all of userspace's writes
are synced, we need to do the syncing after userspace has stopped
submitting the writes, which implies after userspace has been frozen.
Regards,
Nigel
next prev parent reply other threads:[~2009-05-19 1:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.0905122155550.7989-100000@netrider.rowland.org>
2009-05-13 8:03 ` [RFC] why do we need run disk sync before entering S3 Rafael J. Wysocki
[not found] ` <200905131003.15199.rjw@sisk.pl>
2009-05-13 8:45 ` Pavel Machek
[not found] ` <20090513084555.GA27261@elf.ucw.cz>
2009-05-13 8:53 ` Rafael J. Wysocki
[not found] ` <200905131053.39271.rjw@sisk.pl>
2009-05-13 8:57 ` Pavel Machek
2009-05-13 14:06 ` Alan Stern
2009-05-19 1:03 ` Nigel Cunningham [this message]
[not found] <Pine.LNX.4.44L0.0905131000360.3004-100000@iolanthe.rowland.org>
2009-05-13 14:16 ` Rafael J. Wysocki
[not found] ` <200905131616.27334.rjw@sisk.pl>
2009-05-14 9:42 ` Pavel Machek
[not found] ` <20090514094249.GG6417@elf.ucw.cz>
2009-05-15 1:00 ` Henrique de Moraes Holschuh
2009-05-15 14:36 ` Rafael J. Wysocki
[not found] ` <200905151636.01318.rjw@sisk.pl>
2009-05-18 7:25 ` Zhang Rui
[not found] ` <1242631507.16529.107.camel@rzhang-dt>
2009-05-22 15:33 ` Pavel Machek
[not found] ` <20090522153356.GB27655@elf.ucw.cz>
2009-05-23 7:59 ` Oliver Neukum
[not found] ` <200905230959.23018.oliver@neukum.org>
2009-05-23 8:50 ` [RFC] why do we need run disk sync before entering?S3 Pavel Machek
[not found] ` <20090523085018.GA8782@elf.ucw.cz>
2009-05-23 9:05 ` Oliver Neukum
[not found] ` <200905231105.03828.oliver@neukum.org>
2009-05-23 9:45 ` Pavel Machek
[not found] ` <20090523094518.GB8782@elf.ucw.cz>
2009-05-24 21:02 ` Oliver Neukum
[not found] ` <200905242302.55640.oliver@neukum.org>
2009-05-24 21:14 ` Pavel Machek
[not found] <1242177651.16529.26.camel@rzhang-dt>
2009-05-13 2:01 ` [RFC] why do we need run disk sync before entering S3 Alan Stern
2009-05-13 1:20 Zhang Rui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1242695019.10835.127.camel@nigel-laptop \
--to=ncunningham@crca.org.au \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox