linux-IllusionX/Documentation
Mike Yuan e399257349 mm/memcontrol: respect zswap.writeback setting from parent cg too
Currently, the behavior of zswap.writeback wrt.  the cgroup hierarchy
seems a bit odd.  Unlike zswap.max, it doesn't honor the value from parent
cgroups.  This surfaced when people tried to globally disable zswap
writeback, i.e.  reserve physical swap space only for hibernation [1] -
disabling zswap.writeback only for the root cgroup results in subcgroups
with zswap.writeback=1 still performing writeback.

The inconsistency became more noticeable after I introduced the
MemoryZSwapWriteback= systemd unit setting [2] for controlling the knob.
The patch assumed that the kernel would enforce the value of parent
cgroups.  It could probably be workarounded from systemd's side, by going
up the slice unit tree and inheriting the value.  Yet I think it's more
sensible to make it behave consistently with zswap.max and friends.

[1] https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Disable_zswap_writeback_to_use_the_swap_space_only_for_hibernation
[2] https://github.com/systemd/systemd/pull/31734

Link: https://lkml.kernel.org/r/20240823162506.12117-1-me@yhndnzj.com
Fixes: 501a06fe8e ("zswap: memcontrol: implement zswap writeback disabling")
Signed-off-by: Mike Yuan <me@yhndnzj.com>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Acked-by: Yosry Ahmed <yosryahmed@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Koutný <mkoutny@suse.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-01 17:59:02 -07:00
..
ABI powerpc fixes for 6.11 #2 2024-08-17 19:23:02 -07:00
accel
accounting
admin-guide mm/memcontrol: respect zswap.writeback setting from parent cg too 2024-09-01 17:59:02 -07:00
arch Merge patch series "RISC-V: hwprobe: Misaligned scalar perf fix and rename" 2024-08-15 13:12:21 -07:00
block block: fix spelling and grammar for in writeback_cache_control.rst 2024-06-20 06:53:14 -06:00
bpf bpf, docs: Address comments from IETF Area Directors 2024-06-23 09:10:26 -07:00
cdrom
core-api workqueue: doc: Fix function name, remove markers 2024-08-05 18:33:36 -10:00
cpu-freq
crypto docs: crypto: async-tx-api: fix broken code example 2024-06-12 15:41:09 -06:00
dev-tools - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
devicetree USB fixes for 6.11-rc6 2024-09-01 07:06:28 +12:00
doc-guide doc-guide: kernel-doc: document Returns: spelling 2024-05-30 13:35:07 -06:00
driver-api thermal: core: Update thermal zone registration documentation 2024-08-02 13:22:37 +02:00
fault-injection
fb
features LoongArch: Add ARCH_HAS_DEBUG_VM_PGTABLE support 2024-07-20 22:40:59 +08:00
filesystems Changes since last update: 2024-08-22 06:06:09 +08:00
firmware-guide
firmware_class
fpga
gpu Documentation/amdgpu: Fix duplicate declaration 2024-07-16 11:45:22 -04:00
hid HID: bpf: allow hid_device_event hooks to inject input reports on self 2024-06-27 11:00:48 +02:00
hwmon hwmon updates for v6.11-rc1 2024-07-15 17:39:13 -07:00
i2c This release includes significant updates, with the primary 2024-07-13 11:10:54 +02:00
iio Documentation: iio: Document high-speed DMABUF based API 2024-06-30 11:30:18 +01:00
images
infiniband
input
isdn
kbuild Documentation/llvm: turn make command for ccache into code block 2024-08-16 21:34:12 +09:00
kernel-hacking
leds docs: leds: leds-blinkm.rst: Fix 'dasy-chain' typo 2024-06-21 11:57:10 +01:00
litmus-tests
livepatch
locking hwspinlock: Introduce hwspin_lock_bust() 2024-05-29 12:52:26 -07:00
maintainer docs: maintainer: discourage taking conversations off-list 2024-07-16 11:08:26 -06:00
mhi
misc-devices misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver 2024-07-10 14:58:29 +02:00
mm - 875fa64577da ("mm/hugetlb_vmemmap: fix race with speculative PFN 2024-07-21 17:15:46 -07:00
netlabel
netlink ethtool: rss: echo the context number back 2024-07-25 16:23:47 -07:00
networking ethtool: rss: echo the context number back 2024-07-25 16:23:47 -07:00
nvdimm
nvme
PCI Merge branch 'pci/misc' 2024-07-19 10:10:33 -05:00
pcmcia
peci
power regulator: core: Add helper for allow HW access to enable/disable regulator 2024-06-26 18:17:05 +01:00
process net: drop special comment style 2024-08-23 10:21:02 +01:00
RCU Merge branches 'doc.2024.06.06a', 'fixes.2024.07.04a', 'mb.2024.06.28a', 'nocb.2024.06.03a', 'rcu-tasks.2024.06.06a', 'rcutorture.2024.06.06a' and 'srcu.2024.06.18a' into HEAD 2024-07-04 13:54:17 -07:00
rust Rust changes for v6.11 2024-07-27 13:44:54 -07:00
scheduler docs/sp_SP: Add translation for scheduler/sched-design-CFS.rst 2024-07-09 09:14:33 -06:00
scsi
security
sound
sphinx
sphinx-static
spi
staging Docs: Move magic-number from process to staging 2024-06-26 16:36:00 -06:00
target
tee
timers
tools Documentation/tools/rv: fix document header 2024-07-03 16:36:21 -06:00
trace ftrace: Rewrite of function graph tracer 2024-07-18 13:36:33 -07:00
translations pci-v6.11-changes 2024-07-19 19:03:18 -07:00
usb
userspace-api media: v4l: Fix missing tabular column hint for Y14P format 2024-07-30 08:36:29 +02:00
virt KVM/arm64 fixes for 6.11, round #1 2024-08-13 06:06:27 -04:00
w1
watchdog
wmi platform/x86: msi-wmi-platform: Fix spelling mistakes 2024-07-31 12:37:01 +03:00
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py
docutils.conf
dontdiff
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst