lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 14 Feb 2024 12:33:29 +0530
From: Nikhil V <quic_nprakash@...cinc.com>
To: Randy Dunlap <rdunlap@...radead.org>, Pavel Machek <pavel@....cz>,
        "Len
 Brown" <len.brown@...el.com>, Jonathan Corbet <corbet@....net>,
        "Rafael J.
 Wysocki" <rafael@...nel.org>
CC: "Paul E. McKenney" <paulmck@...nel.org>, Tejun Heo <tj@...nel.org>,
        Yan-Jie Wang <yanjiewtw@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        "Steven Rostedt (Google)" <rostedt@...dmis.org>,
        Catalin Marinas
	<catalin.marinas@....com>,
        <linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-pm@...r.kernel.org>, <quic_pkondeti@...cinc.com>,
        <quic_kprasan@...cinc.com>, <quic_mpilaniy@...cinc.com>,
        <quic_shrekk@...cinc.com>, <mpleshivenkov@...gle.com>,
        <ericyin@...gle.com>
Subject: Re: [PATCH] PM: hibernate: Support to select compression algorithm



On 2/13/2024 12:34 AM, Randy Dunlap wrote:
> 
> 
> On 2/12/24 04:32, Nikhil V wrote:
>> Currently the default compression algorithm is selected based on
>> compile time options. Introduce a module parameter "hibernate.compressor"
>> to override this behaviour.
>>
>> Different compression algorithms have different characteristics and
>> hibernation may benefit when it uses any of these algorithms, especially
>> when a secondary algorithm(LZ4) offers better decompression speeds over a
>> default algorithm(LZO), which in turn reduces hibernation image restore
>> time.
>>
>> Users can override the default algorithm in two ways:
>>   1) Passing "hibernate.compressor" as kernel command line parameter.
>>      Usage:
>>      	LZO: hibernate.compressor=lzo
>>      	LZ4: hibernate.compressor=lz4
>>
>>   2) Specifying the algorithm at runtime.
>>      Usage:
>> 	LZO: echo lzo > /sys/module/hibernate/parameters/compressor
>> 	LZ4: echo lz4 > /sys/module/hibernate/parameters/compressor
>>
>> Currently LZO and LZ4 are the supported algorithms. LZO is the default
>> compression algorithm used with hibernation.
>>
>> Signed-off-by: Nikhil V <quic_nprakash@...cinc.com>
>> ---
>> This patch is dependent on the patch series, [1] (patches 1/4 to 3/4).
>> This is picked in linux-next, [2].
>>   [1] https://lore.kernel.org/all/cover.1705927916.git.quic_nprakash@quicinc.com/
>>   [2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/kernel/power?h=next-20240212
>>
>>   .../admin-guide/kernel-parameters.txt         | 10 ++++
>>   kernel/power/hibernate.c                      | 57 ++++++++++++++++++-
>>   2 files changed, 64 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
>> index 31b3a25680d0..522155056645 100644
>> --- a/Documentation/admin-guide/kernel-parameters.txt
>> +++ b/Documentation/admin-guide/kernel-parameters.txt
>> @@ -1748,6 +1748,16 @@
>>   				(that will set all pages holding image data
>>   				during restoration read-only).
>>   
> 
> Hi,
> Please add something like:
> 
> 
>> +	hibernate.compressor= 	[HIBERNATION] Compression algorithm to be
>> +				used with hibernation.
>> +				Format: { lzo | lz4 }
> 				Default: lzo
>> +
>> +				lzo: Select LZO compression algorithm to
>> +				compress/decompress hibernation image.
>> +
>> +				lz4: Select LZ4 compression algorithm to
>> +				compress/decompress hibernation image.
>> +
>>   	highmem=nn[KMG]	[KNL,BOOT] forces the highmem zone to have an exact
>>   			size of <nn>. This works even on boxes that have no
>>   			highmem otherwise. This also works to reduce highmem
> 
> 
> thanks.

Hi @Randy,

Will update the documentation as mentioned and send the patch for review.

Thanks,
Nikhil V

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ