<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/kernel/power/swap.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-01-05T18:12:56Z</updated>
<entry>
<title>PM: hibernate: Fix crash when freeing invalid crypto compressor</title>
<updated>2026-01-05T18:12:56Z</updated>
<author>
<name>Malaya Kumar Rout</name>
</author>
<published>2025-12-30T11:56:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7966cf0ebe32c981bfa3db252cb5fc3bb1bf2e77'/>
<id>urn:sha1:7966cf0ebe32c981bfa3db252cb5fc3bb1bf2e77</id>
<content type='text'>
When crypto_alloc_acomp() fails, it returns an ERR_PTR value, not NULL.

The cleanup code in save_compressed_image() and load_compressed_image()
unconditionally calls crypto_free_acomp() without checking for ERR_PTR,
which causes crypto_acomp_tfm() to dereference an invalid pointer and
crash the kernel.

This can be triggered when the compression algorithm is unavailable
(e.g., CONFIG_CRYPTO_LZO not enabled).

Fix by adding IS_ERR_OR_NULL() checks before calling crypto_free_acomp()
and acomp_request_free(), similar to the existing kthread_stop() check.

Fixes: b03d542c3c95 ("PM: hibernate: Use crypto_acomp interface")
Signed-off-by: Malaya Kumar Rout &lt;mrout@redhat.com&gt;
Cc: 6.15+ &lt;stable@vger.kernel.org&gt; # 6.15+
[ rjw: Added 2 empty code lines ]
Link: https://patch.msgid.link/20251230115613.64080-1-mrout@redhat.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: hibernate: Extra cleanup of comments in swap handling code</title>
<updated>2025-11-24T19:41:06Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2025-11-21T20:09:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c03aef8833597f184cc3439d2d336596f63bd709'/>
<id>urn:sha1:c03aef8833597f184cc3439d2d336596f63bd709</id>
<content type='text'>
Continue recent cleanups of comments in the swap handling code.

Unify the use of white space in the comments, drop some unuseful
comments outside function bodies, and move some other comments into
function bodies.

No functional impact.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://patch.msgid.link/5943864.DvuYhMxLoT@rafael.j.wysocki
</content>
</entry>
<entry>
<title>PM: hibernate: Clean up kernel-doc comment style usage</title>
<updated>2025-11-17T19:16:56Z</updated>
<author>
<name>Sunday Adelodun</name>
</author>
<published>2025-11-14T22:04:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=46fc75a29b7034d1971afcbdf47b88926a46b1ea'/>
<id>urn:sha1:46fc75a29b7034d1971afcbdf47b88926a46b1ea</id>
<content type='text'>
Several static functions in kernel/power/swap.c were described using the
kernel-doc comment style (/** ... */) even though they are not exported
or referenced by generated documentation. This led to kernel-doc warnings
and stylistic inconsistencies.

Convert these unnecessary kernel-doc blocks to regular C comments,
remove comment blocks that are no longer useful, relocate comments to
more appropriate positions where needed, and fix a few "Return:"
descriptions that were either missing or incorrectly formatted.

No functional changes.

Signed-off-by: Sunday Adelodun &lt;adelodunolaoluwa@yahoo.com&gt;
[ rjw: Subject adjustment, changelog edits, comment edits ]
Link: https://patch.msgid.link/20251114220438.52448-1-adelodunolaoluwa@yahoo.com
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge back earlier material related to system sleep for 6.19</title>
<updated>2025-11-17T15:55:55Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2025-11-17T15:55:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=37d6d92fe0859f72a25f91f875efa6feb676de68'/>
<id>urn:sha1:37d6d92fe0859f72a25f91f875efa6feb676de68</id>
<content type='text'>
</content>
</entry>
<entry>
<title>PM: hibernate: Fix style issues in save_compressed_image()</title>
<updated>2025-11-07T15:53:57Z</updated>
<author>
<name>Mario Limonciello (AMD)</name>
</author>
<published>2025-11-06T04:51:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b6c10cb8479d0d1b7b208277df2e2afe082d4bd'/>
<id>urn:sha1:0b6c10cb8479d0d1b7b208277df2e2afe082d4bd</id>
<content type='text'>
Address two issues indicated by checkpatch:

 - Trailing statements should be on next line.
 - Prefer 'unsigned int' to bare use of 'unsigned'.

Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
[ rjw: Changelog edits ]
Link: https://patch.msgid.link/20251106045158.3198061-4-superm1@kernel.org
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: hibernate: Use atomic64_t for compressed_size variable</title>
<updated>2025-11-07T15:53:56Z</updated>
<author>
<name>Mario Limonciello (AMD)</name>
</author>
<published>2025-11-06T04:51:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=66ededc694f1d06a71ca35a3c8e3689e9b85b3ce'/>
<id>urn:sha1:66ededc694f1d06a71ca35a3c8e3689e9b85b3ce</id>
<content type='text'>
`compressed_size` can overflow, showing nonsensical values.

Change from `atomic_t` to `atomic64_t` to prevent overflow.

Fixes: a06c6f5d3cc9 ("PM: hibernate: Move to crypto APIs for LZO compression")
Reported-by: Askar Safin &lt;safinaskar@gmail.com&gt;
Closes: https://lore.kernel.org/linux-pm/20251105180506.137448-1-safinaskar@gmail.com/
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Tested-by: Askar Safin &lt;safinaskar@gmail.com&gt;
Cc: 6.9+ &lt;stable@vger.kernel.org&gt; # 6.9+
Link: https://patch.msgid.link/20251106045158.3198061-3-superm1@kernel.org
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: hibernate: Emit an error when image writing fails</title>
<updated>2025-11-07T15:53:56Z</updated>
<author>
<name>Mario Limonciello (AMD)</name>
</author>
<published>2025-11-06T04:51:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=62b9ca1706e1bbb60d945a58de7c7b5826f6b2a2'/>
<id>urn:sha1:62b9ca1706e1bbb60d945a58de7c7b5826f6b2a2</id>
<content type='text'>
If image writing fails, a return code is passed up to the caller, but
none of the callers log anything to the log and so the only record
of it is the return code that userspace gets.

Adjust the logging so that the image size and speed of writing is
only emitted on success and if there is an error, it's saved to the
logs.

Fixes: a06c6f5d3cc9 ("PM: hibernate: Move to crypto APIs for LZO compression")
Reported-by: Askar Safin &lt;safinaskar@gmail.com&gt;
Closes: https://lore.kernel.org/linux-pm/20251105180506.137448-1-safinaskar@gmail.com/
Signed-off-by: Mario Limonciello (AMD) &lt;superm1@kernel.org&gt;
Tested-by: Askar Safin &lt;safinaskar@gmail.com&gt;
Cc: 6.9+ &lt;stable@vger.kernel.org&gt; # 6.9+
[ rjw: Added missing braces after "else", changelog edits ]
Link: https://patch.msgid.link/20251106045158.3198061-2-superm1@kernel.org
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: hibernate: add sysfs interface for hibernate_compression_threads</title>
<updated>2025-10-30T19:07:00Z</updated>
<author>
<name>Xueqin Luo</name>
</author>
<published>2025-10-21T11:37:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea358066ded351036cb8b69c424a05e223472a03'/>
<id>urn:sha1:ea358066ded351036cb8b69c424a05e223472a03</id>
<content type='text'>
Add a sysfs attribute `/sys/power/hibernate_compression_threads` to
allow runtime configuration of the number of threads used for
compressing and decompressing hibernation images.

The new sysfs interface enables dynamic adjustment at runtime:

    # cat /sys/power/hibernate_compression_threads
    3
    # echo 4 &gt; /sys/power/hibernate_compression_threads

This change provides greater flexibility for debugging and performance
tuning of hibernation without requiring a reboot.

Signed-off-by: Xueqin Luo &lt;luoxueqin@kylinos.cn&gt;
Link: https://patch.msgid.link/c68c62f97fabf32507b8794ad8c16cd22ee656ac.1761046167.git.luoxueqin@kylinos.cn
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: hibernate: make compression threads configurable</title>
<updated>2025-10-30T19:07:00Z</updated>
<author>
<name>Xueqin Luo</name>
</author>
<published>2025-10-21T11:37:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=090bf5a0f40030f4ef294a3edb84c5e99b843c7f'/>
<id>urn:sha1:090bf5a0f40030f4ef294a3edb84c5e99b843c7f</id>
<content type='text'>
The number of compression/decompression threads has a direct impact on
hibernate image generation and resume latency. Using more threads can
reduce overall resume time, but on systems with fewer CPU cores it may
also introduce contention and reduce efficiency.

Performance was evaluated on an 8-core ARM system, averaged over 10 runs:

    Threads  Hibernate(s)  Resume(s)
    --------------------------------
       3         12.14       18.86
       4         12.28       17.48
       5         11.09       16.77
       6         11.08       16.44

With 5–6 threads, resume latency improves by approximately 12% compared
to the default 3-thread configuration, with negligible impact on
hibernate time.

Introduce a new kernel parameter `hibernate_compression_threads=` that
allows users and integrators to tune the number of
compression/decompression threads at boot. This provides a way to
balance performance and CPU utilization across a wide range of hardware
without recompiling the kernel.

Signed-off-by: Xueqin Luo &lt;luoxueqin@kylinos.cn&gt;
Link: https://patch.msgid.link/f24b3ca6416e230a515a154ed4c121d72a7e05a6.1761046167.git.luoxueqin@kylinos.cn
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM: hibernate: dynamically allocate crc-&gt;unc_len/unc for configurable threads</title>
<updated>2025-10-30T19:07:00Z</updated>
<author>
<name>Xueqin Luo</name>
</author>
<published>2025-10-21T11:37:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e114e2eb7e85b5cc737ff5286cfe68a58caffeba'/>
<id>urn:sha1:e114e2eb7e85b5cc737ff5286cfe68a58caffeba</id>
<content type='text'>
Convert crc-&gt;unc_len and crc-&gt;unc from fixed-size arrays to dynamically
allocated arrays, sized according to the actual number of threads selected
at runtime. This removes the fixed limit imposed by CMP_THREADS.

Signed-off-by: Xueqin Luo &lt;luoxueqin@kylinos.cn&gt;
Link: https://patch.msgid.link/b5db63bb95729482d2649b12d3a11cb7547b7fcc.1761046167.git.luoxueqin@kylinos.cn
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
