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

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

 



Hi.

On 23/08/10 05:47, Rafael J. Wysocki wrote:
> On Saturday, August 21, 2010, Nigel Cunningham wrote:
>> Hi.
>>
>> Sorry for being slow to reply, but to my mind, having two copies of the
>> whole save and load routines is just plain ugly and makes
>> maintainability a nightmare.
>
> Well, how much code is actually duplicated by having separate
> routines for with and without compression?  I don't think it's too much.
>
>> Every time I've thought there's been a problem with compression or
>> decompression, it has turned out to be a problem in my code instead.
>> Let's not waste time and effort duplicating code unnecessarily.
>
> Having two separate functions for image saving/restoring, depending on cartain
> condition, is not wrong in principle as long as they are sufficiently different.
> So going back to the previous question, aren't they?
>
> An alternative is to put several conditionals into a sensitive piece of code,
> which I'd rather prefer to avoid.

I understand that it's better to have them separate if you have them 
both. What I'm arguing is that it's pointless to have the two versions 
in the first place. We don't normally add options to disable 
improvements, and there's no need to do so this time.

Regards,

Nigel
_______________________________________________
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