Re: [PATCH 1/1] mm: add swapiness= arg to memory.reclaim
From: Andrew Morton
Date: Thu Nov 30 2023 - 16:33:44 EST
On Thu, 30 Nov 2023 07:36:54 -0800 Dan Schatzberg <schatzberg.dan@xxxxxxxxx> wrote:
> Allow proactive reclaimers to submit an additional swappiness=<val>
> argument to memory.reclaim. This overrides the global or per-memcg
> swappiness setting for that reclaim attempt.
>
> For example:
>
> echo "2M swappiness=0" > /sys/fs/cgroup/memory.reclaim
>
> will perform reclaim on the rootcg with a swappiness setting of 0 (no
> swap) regardless of the vm.swappiness sysctl setting.
>
> Signed-off-by: Dan Schatzberg <schatzberg.dan@xxxxxxxxx>
> ---
> include/linux/swap.h | 3 ++-
> mm/memcontrol.c | 55 +++++++++++++++++++++++++++++++++++---------
> mm/vmscan.c | 13 +++++++++--
Documentation/admin-guide/cgroup-v2.rst is feeling unloved!
Please check whether this interface change can lead to
non-backward-compatible userspace. If someone's script does the above
echo command, will it break on older kernels? If so, does it matter?