All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bojan Smojver <bojan@rexursive.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH 1/2] PM: Compress hibernation image with LZO
Date: Thu, 19 Aug 2010 09:41:21 +1000	[thread overview]
Message-ID: <1282174881.17635.93.camel@shrek.rexursive.com> (raw)
In-Reply-To: <201008190102.04474.rjw@sisk.pl>

On Thu, 2010-08-19 at 01:02 +0200, Rafael J. Wysocki wrote:

> I'm not a big fan of select in Kconfig.  It ususally causes one to be surprised
> with the final choice of options in .config.
> 
> Does that work at all if CRYPTO_ALGAPI is not set?

My understanding is that these (LZO_COMPRESS/LZO_DECOMPRESS) do not
depend on anything. But, I can test, just to be sure.

> I'd rather wouldn't like the above to be unconditional.  If not for anything
> else, I think it would be nice to be able to switch the compression off for
> debugging purposes (like when we're not sure why the image is corrupted or
> similar).  A kernel command line switch would suffice for that IMO.

OK. I think the cleanest way may be to have a set of two "real"
save_image()/load_image() functions. One set with compression, the other
without, which are then called by save_image()/load_image(). OK?

> > +		if (!i)
> >  			break;
> 
> This statement is profoundly hard to decode.  Perhaps there's a better name for 'i'?
> Like 'size' or similar?

Right. Maybe I'm a bit too economical with names. Usually things like
'i' stand for a generic counter, which this is. I'll use something else
if you don't like it.

> Also please make it possible to switch the compression off here too.
> 
> The comments above seem to apply to the remaining code too.

OK, I'll prepare a patch that has compression/decompression as optional,
using kernel command line switch. Obviously, if one attempts to thaw
from an image that is not in an expected state (compressed/not
compressed), this will wreak havoc. But, I guess that's understandable.

-- 
Bojan

  reply	other threads:[~2010-08-18 23:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-10  2:29 [PATCH 1/2] PM: Compress hibernation image with LZO Bojan Smojver
2010-08-17  0:52 ` Bojan Smojver
2010-08-17 10:55   ` Rafael J. Wysocki
2010-08-17 13:38     ` Bojan Smojver
2010-08-18 23:02 ` Rafael J. Wysocki
2010-08-18 23:41   ` Bojan Smojver [this message]
2010-08-19  9:49     ` Bojan Smojver
2010-08-19 11:11       ` Bojan Smojver
2010-08-20 23:32         ` Rafael J. Wysocki
2010-08-20 12:11       ` Bojan Smojver
2010-08-20 23:36         ` Rafael J. Wysocki
2010-08-21  4:40           ` Bojan Smojver
2010-08-22 19:23             ` Rafael J. Wysocki
2010-08-22 19:29           ` Rafael J. Wysocki
2010-08-22 22:33             ` Bojan Smojver
2010-08-22 23:47               ` Bojan Smojver
2010-08-23 21:43                 ` Rafael J. Wysocki
2010-08-23 23:20                   ` Bojan Smojver
2010-09-08 23:45                 ` Rafael J. Wysocki
2010-09-09  0:08                   ` Bojan Smojver
2010-08-21  6:15       ` Nigel Cunningham
2010-08-22 19:47         ` Rafael J. Wysocki
2010-08-22 21:52           ` Nigel Cunningham
2010-08-19 13:40     ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2010-08-05  3:08 Bojan Smojver
2010-08-05  3:38 ` Bojan Smojver

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=1282174881.17635.93.camel@shrek.rexursive.com \
    --to=bojan@rexursive.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.