lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250227161934.GA115948@cmpxchg.org>
Date: Thu, 27 Feb 2025 11:19:34 -0500
From: Johannes Weiner <hannes@...xchg.org>
To: Joshua Hahn <joshua.hahnjy@...il.com>
Cc: ying chen <yc1082463@...il.com>, akpm@...ux-foundation.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/vmscan: when the swappiness is set to 0, memory
 swapping should be prohibited during the global reclaim process

Hello,

On Thu, Feb 27, 2025 at 07:54:27AM -0800, Joshua Hahn wrote:
> On Thu, 27 Feb 2025 22:34:51 +0800 ying chen <yc1082463@...il.com> wrote:

> Previously, when the system is under a lot of memory pressure and is
> facing OOMs, global reclaim can create space for the system and prevent
> going out of memory by swapping, even when swappiness is 0. If this patch
> removes that check, it would mean that global reclaim can no longer
> "bypass" the swappiness == 0 condition.
> 
> I am also CCing Johannes, who is the original author of this section [1],
> who clarified in the patch that swappiness == 0 has different meanings for
> global reclaim and memory cgroup reclaim.

Yes. It's been the behavior for decades that swappiness is merely a
preference, and that the VM *will* swap to avert OOM. You would break
users making this change.

If you want to hard-exempt cgroups, set memory.swap.max=0.

[ Yes, it's inconsistent. But it's really cgroup_reclaim() that is the
  oddball in this. Also for historical reasons... ]

> > when the vm.swappiness is set to 0, global reclaim should also refrain
> > from memory swapping, just like these cgroups.
> > 
> > Signed-off-by: yc1082463 <yc1082463@...il.com>

Nacked-by: Johannes Weiner <hannes@...xchg.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ