linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: Barry Song <Barry.Song@csr.com>,
	Xiangzhen Ye <Xiangzhen.Ye@csr.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"workgroup.linux@csr.com" <workgroup.linux@csr.com>,
	"rjw@sisk.pl" <rjw@sisk.pl>, "pavel@ucw.cz" <pavel@ucw.cz>,
	Barry Song <Baohua.Song@csr.com>,
	"linux-pm@lists.linux-foundation.org" 
	<linux-pm@lists.linux-foundation.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2] PM: HIBERNATION: skip the swap size check if the snapshot image size is anticipative
Date: Fri, 25 Nov 2011 21:42:46 +0800	[thread overview]
Message-ID: <CAGsJ_4yse3kjRd+GGeZ81WEJPM0gEX=Ljik_EpGjnwS8pjxfMA@mail.gmail.com> (raw)
In-Reply-To: <4ECF6C36.8000702@parrot.com>

Hi Matthieu,

2011/11/25 Matthieu CASTET <matthieu.castet@parrot.com>
>
> Hi,
>
> but did embedded system will really use swap interface ?

if you self-define the hibernation flow, you don't need swap. but for
embedded system, we actually can still use the standard flow, swapon
before hibernation, and swapoff after restore. so the swap partition
only works as a partition to save used pages based on swap format. it
is not a runtime swap partition at all.

>
> Often they don't have swap and can already save suspend image in disk/nand :
> - SNAPSHOT_CREATE_IMAGE
> - read it from /dev/snapshot and write it to a file.
>
> The only problem with the current interface, is that you can't SNAPSHOT_UNFREEZE
> before reading the image.
> But this is need for some filesystem that have thread.
>
>
> For example we have a demo where we save the suspend image in a ubi volume and
> restore it from bootloader.
yes. we can definitely resume snapshot from bootloader directly, that
depends on your self-defined hibernation flow. if that works well, it
will save about 0.5s kernel boot time for a typical cortex-a9 ARM 1Ghz
system.

but you still need to take care you only compress and save used pages
but not all pages. sync, drop page caches and kill non-system
processes will help much to decrease hibernation image size. and
standard hibernation flow will only save used pages, that is very
important for decreasing snapshot size and restore faster.

i am happy to hear you have a demo. do you have a website to show your
demo and techinical details?

>
>
> Matthieu
>
-barry

  reply	other threads:[~2011-11-25 13:43 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 [this message]
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
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_4yse3kjRd+GGeZ81WEJPM0gEX=Ljik_EpGjnwS8pjxfMA@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=matthieu.castet@parrot.com \
    --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).