This is a note to let you know that I've just added the patch titled mm: memcontrol: clarify swapaccount=0 deprecation warning to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mm-memcontrol-clarify-swapaccount-0-deprecation-warning.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 118642d7f606fc9b9c92ee611275420320290ffb Mon Sep 17 00:00:00 2001 From: Johannes Weiner <hannes@xxxxxxxxxxx> Date: Tue, 13 Feb 2024 03:16:34 -0500 Subject: mm: memcontrol: clarify swapaccount=0 deprecation warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Johannes Weiner <hannes@xxxxxxxxxxx> commit 118642d7f606fc9b9c92ee611275420320290ffb upstream. The swapaccount deprecation warning is throwing false positives. Since we deprecated the knob and defaulted to enabling, the only reports we've been getting are from folks that set swapaccount=1. While this is a nice affirmation that always-enabling was the right choice, we certainly don't want to warn when users request the supported mode. Only warn when disabling is requested, and clarify the warning. [colin.i.king@xxxxxxxxx: spelling: "commdandline" -> "commandline"] Link: https://lkml.kernel.org/r/20240215090544.1649201-1-colin.i.king@xxxxxxxxx Link: https://lkml.kernel.org/r/20240213081634.3652326-1-hannes@xxxxxxxxxxx Fixes: b25806dcd3d5 ("mm: memcontrol: deprecate swapaccounting=0 mode") Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx> Reported-by: "Jonas Schäfer" <jonas@xxxxxxxxxxxxx> Reported-by: Narcis Garcia <debianlists@xxxxxxxxx> Suggested-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx> Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Reviewed-by: Yosry Ahmed <yosryahmed@xxxxxxxxxx> Acked-by: Michal Hocko <mhocko@xxxxxxxx> Acked-by: Shakeel Butt <shakeelb@xxxxxxxxxx> Cc: Roman Gushchin <roman.gushchin@xxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- mm/memcontrol.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -7613,9 +7613,13 @@ bool mem_cgroup_swap_full(struct folio * static int __init setup_swap_account(char *s) { - pr_warn_once("The swapaccount= commandline option is deprecated. " - "Please report your usecase to linux-mm@xxxxxxxxx if you " - "depend on this functionality.\n"); + bool res; + + if (!kstrtobool(s, &res) && !res) + pr_warn_once("The swapaccount=0 commandline option is deprecated " + "in favor of configuring swap control via cgroupfs. " + "Please report your usecase to linux-mm@xxxxxxxxx if you " + "depend on this functionality.\n"); return 1; } __setup("swapaccount=", setup_swap_account); Patches currently in stable-queue which might be from hannes@xxxxxxxxxxx are queue-6.6/mm-memcontrol-clarify-swapaccount-0-deprecation-warning.patch queue-6.6/mm-swap-fix-race-when-skipping-swapcache.patch