Re: [PATCH 1/2] PM: Compress hibernation image with LZO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux