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] [day] [month] [year] [list]
Message-ID: <CAJj2-QHU9q_xi4+Z_JrPCgm2DXuRWTj2rpL5pGRDoNV5yZF_og@mail.gmail.com>
Date: Mon, 9 Jun 2025 14:00:42 -0700
From: Yuanchu Xie <yuanchu@...gle.com>
To: Koichiro Den <den@...inux.co.jp>
Cc: linux-mm@...ck.org, akpm@...ux-foundation.org, yuzhao@...gle.com, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] mm: vmscan: apply proportional reclaim pressure for
 memcg when MGLRU is enabled

On Fri, May 30, 2025 at 9:24 AM Koichiro Den <den@...inux.co.jp> wrote:
>
> From: Koichiro Den <koichiro.den@...onical.com>
>
> The scan implementation for MGLRU was missing proportional reclaim
> pressure for memcg, which contradicts the description in
> Documentation/admin-guide/cgroup-v2.rst (memory.{low,min} section).
>
> This issue can be observed in kselftest cgroup:test_memcontrol
> (specifically test_memcg_min and test_memcg_low). The following table
> shows the actual values observed in my local test env (on xfs) and the
> error "e", which is the symmetric absolute percentage error from the ideal
> values of 29M for c[0] and 21M for c[1].
>
>   test_memcg_min
>
>          | MGLRU enabled   | MGLRU enabled   | MGLRU disabled
>          | Without patch   | With patch      |
>     -----|-----------------|-----------------|---------------
>     c[0] | 25964544 (e=8%) | 28770304 (e=3%) | 27820032 (e=4%)
>     c[1] | 26214400 (e=9%) | 23998464 (e=4%) | 24776704 (e=6%)
>
>   test_memcg_low
>
>          | MGLRU enabled   | MGLRU enabled   | MGLRU disabled
>          | Without patch   | With patch      |
>     -----|-----------------|-----------------|---------------
>     c[0] | 26214400 (e=7%) | 27930624 (e=4%) | 27688960 (e=5%)
>     c[1] | 26214400 (e=9%) | 24764416 (e=6%) | 24920064 (e=6%)
>
> Factor out the proportioning logic to a new function and have MGLRU
> reuse it. While at it, update the eviction behavior via debugfs
> 'lru_gen' interface ('-' command with an explicit 'nr_to_reclaim'
> parameter) to ensure eviction is limited to the specified number.
>
> Signed-off-by: Koichiro Den <koichiro.den@...onical.com>
> ---
> Changes in v2:
> - Leverage the new evict_folios() parameter to ensure correct eviction
>   limitation via debugfs
> - Update the commit message to use the latest upstream kselftest instead
>   of LTP memcontrol03.
>
> v1: https://lore.kernel.org/all/20250404141118.3895592-1-koichiro.den@canonical.com/
> ---
Thanks for the update. It seems like Andrew already pulled the patch
into mm-new.

Reviewed-by: Yuanchu Xie <yuanchu@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ