You are not logged in.
Summary:
Kernel 6.17.9 triggers a reproducible kernel panic when zswap is enabled and CPU hotplug is used (e.g., via GameMode park_cores).
Kernel 6.15.x works perfectly under identical conditions → regression.
System Information
CPU: AMD Ryzen 7 4700U (8C/8T)
Kernel: 6.17.8-arch1-1 (crashes), 6.15.x (working)
Distribution: Arch Linux
Hardware: Lenovo IdeaPad LNVNB161216
Trigger: GameMode dynamically parking CPU cores
GameMode config:
[cpu]
park_cores=1,3,5,7Reproduction Steps
Enable GameMode with park_cores
Launch any Proton/Lutris game
GameMode parks CPU cores via CPU hotplug
System enters memory pressure
Immediate kernel panic in kswapd0Crash Details
BUG: unable to handle page fault for address: ffff8e06b3b09000
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
Oops: Oops: 0002 [#1] SMP NOPTICall Trace:
_raw_spin_lock_bh+0x1b/0x40
crypto_acomp_lock_stream_bh+0x34/0xb0
zstd_compress+0x81/0x310
zswap_store+0x466/0xba0
swap_writeout+0x110/0x300
shmem_writeout+0x305/0x460
shrink_folio_list+0x5da/0xf20
evict_folios+0x2cd/0x790
kswapd+0x1d9/0x370CR2 register:
CR2: ffff8e06b3b09000 (invalid per-CPU data address)Analysis
The crash is caused by zswap using a per-CPU async compression context (acomp_ctx) belonging to a CPU that has just been taken offline.
Sequence:
GameMode parks CPU → CPU hot-plug offline event
zswap compression begins, storing a pointer to the per-CPU acomp_ctx
CPU goes offline → its per-CPU memory becomes invalid
kswapd0 tries to access the now-nonexistent per-CPU structure
→ _raw_spin_lock_bh() faults on an invalid GS address
→ kernel panic
This matches upstream reports:
Red Hat Bug
https://bugzilla.redhat.com/show_bug.cgi?id=2269550
LKML thread
https://lkml.org/lkml/2025/1/8/29
Proposed patch (not yet in mainline or Arch stable)
https://www.spinics.net/lists/stable/msg806293.html
Additional Confirmation
With zswap enabled:
echo 0 > /sys/devices/system/cpu/cpu7/online
→ immediate kernel panicWith zswap disabled:
echo 0 > /sys/module/zswap/parameters/enabled
echo 0 > /sys/devices/system/cpu/cpu7/online
CPU 7 goes offline cleanlyThis confirms:
The bug is in zswap, not CPU hotplug itself.
Workarounds
1. Disable zswap completely (recommended until fixed)
Add to kernel command line:
zswap.enabled=02. Avoid CPU hotplug; use CPU pinning instead
GameMode:
[cpu]
;park_cores=1,3,5,7
pin_cores=0,2,4,6Regression Window
6.15.x → OK
6.17.8 → panic
Likely introduced between 6.16 and 6.17 when zswap’s per-CPU async compressor code was reworked.
Last edited by phil2sat (2025-11-26 12:58:57)
Offline
this looks like ai
Offline
nah, its me, just researched and put all together with maybe a little bit of ai formatting help, lol.
just upgraded and bam, bluescreen, what the heck...
if im back home i try the patch again.
Offline
Next time tell the AI to use https://bbs.archlinux.org/help.php#bbcode formatting ![]()
For now please edit your post and provide that yourself, thanks ![]()
Kernel 6.15.x: Works perfectly with park_cores
Kernel 6.17.8: Instant panic with park_cores
Regression introduced somewhere between 6.15 and 6.17
zswap appears to be enabled by default even without explicit configuration
zswap used to be disabled for a couple of kernels, is/was it enabled on the unaffected 6.15 kernel(s)?
Offline
Fixed in 6.17.9
cat /sys/module/zswap/parameters/enabled
─────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: /sys/module/zswap/parameters/enabled
─────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ Y
echo 0 > /sys/devices/system/cpu/cpu7/online
dmesg
smpboot: CPU 7 is now offline
no panic...Offline
Not fixed if multiple CPU's go offline the error occurs again (GameMode)
Offline
Is the error still present on 6.18?
sudo pacman -U https://pkgbuild.com/~gromit/linux-bisection-kernels/linux-mainline-6.18-1-x86_64.pkg.tar.zstOffline