linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>, Barry Song <Barry.Song@csr.com>,
	linux-pm@lists.linux-foundation.org, workgroup.linux@csr.com,
	Xiangzhen Ye <Xiangzhen.Ye@csr.com>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Barry Song <Baohua.Song@csr.com>
Subject: Re: [PATCH v2] PM: HIBERNATION: skip the swap size check if the snapshot image size is anticipative
Date: Mon, 9 Jan 2012 10:50:52 +0800	[thread overview]
Message-ID: <CAGsJ_4y+fQ14yDzD1FxtutD7b17KqK+voaywHAZuS0SXK5Z_xQ@mail.gmail.com> (raw)
In-Reply-To: <201201082231.44510.rjw@sisk.pl>

2012/1/9 Rafael J. Wysocki <rjw@sisk.pl>:
> On Friday, January 06, 2012, Barry Song wrote:
>> 2012/1/6 Pavel Machek <pavel@ucw.cz>:
>> > Hi!
>> >
>> > Is the check even useful these days? Should we remove it altogether?
>>
>> i think we can let users or distributions decide whether it is useful.
>> On PC, disk space is not an issue, people might run many applications
>> while doing hibernation, so snapshot is much big. an early check will
>> improve user experience because people don't need to wait a long time
>> and find space is not enough.
>> for embedded system, SoC solutions can know whether the space is
>> enough since they know what are running while doing hibernation, so
>> they can skip the check by setting the flag in sysfs.
>> that is why i had this patch sent.
>
> I agree with Pavel that it's better to drop the check altogether.
>
> The sysfs switch you're adding doesn't seem to be very useful, as PC
> users won't touch it and whoever needs it to be 0, will always set it
> that way and won't change it afterwards.

ok. if we don't have the check, in case swap partition is not enough,
writing failure will happen, system still can restore to normal
status:

for example, in the following test, only 27% data is written with a
small partition, "Restarting tasks ... done" will make system restore
to normal status.

[   11.2080 27%
[   11.403274] PM: Wrote uncompressed 34920 kbytes in 0.65 seconds (53.72 MB/s)
[   11.407649] PM: Wrote compressed 3500 kbytes in 0.65 seconds (5.38 MB/s)
[   11.447176] Restarting tasks ... done.
[   11.448801] ...


>
> Thanks,
> Rafael

-barry

  reply	other threads:[~2012-01-09  2:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-25  8:07 [PATCH v2] PM: HIBERNATION: skip the swap size check if the snapshot image size is anticipative Barry Song
2011-11-25 10:21 ` Matthieu CASTET
2011-11-25 13:42   ` Barry Song
2011-12-15  8:50 ` Barry Song
2012-01-05 18:46   ` Pavel Machek
2012-01-06  2:20     ` Barry Song
2012-01-08 21:31       ` Rafael J. Wysocki
2012-01-09  2:50         ` Barry Song [this message]
2012-01-09 21:46           ` Rafael J. Wysocki

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=CAGsJ_4y+fQ14yDzD1FxtutD7b17KqK+voaywHAZuS0SXK5Z_xQ@mail.gmail.com \
    --to=21cnbao@gmail.com \
    --cc=Baohua.Song@csr.com \
    --cc=Barry.Song@csr.com \
    --cc=Xiangzhen.Ye@csr.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=workgroup.linux@csr.com \
    /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;
as well as URLs for NNTP newsgroup(s).