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]
Date:   Tue, 15 Feb 2022 09:44:15 -0800
From:   Minchan Kim <minchan@...nel.org>
To:     Johannes Weiner <hannes@...xchg.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, kernel-team@...com,
        CGEL <cgel.zte@...il.com>, Joonsoo Kim <iamjoonsoo.kim@....com>,
        Yu Zhao <yuzhao@...gle.com>
Subject: Re: [PATCH] mm: page_io: fix psi memory pressure error on cold
 swapins

On Mon, Feb 14, 2022 at 04:49:21PM -0500, Johannes Weiner wrote:
> Once upon a time, all swapins counted toward memory pressure[1]. Then
> Joonsoo introduced workingset detection for anonymous pages and we
> gained the ability to distinguish hot from cold swapins[2][3]. But we
> failed to update swap_readpage() accordingly, and now we account
> partial memory pressure in the swapin path of cold memory.
> 
> Not for all situations - which adds more inconsistency: paths using
> the conventional submit_bio() and lock_page() route will not see much
> pressure - unless storage itself is heavily congested and the bio
> submissions stall. ZRAM and ZSWAP do most of the work directly from
> swap_readpage() and will see all swapins reflected as pressure.
> 
> Restore consistency by making all swapin stall accounting conditional
> on the page actually being part of the workingset.
> 
> [1] commit 937790699be9 ("mm/page_io.c: annotate refault stalls from swap_readpage")
> [2] commit aae466b0052e ("mm/swap: implement workingset detection for anonymous LRU")
> [3] commit cad8320b4b39 ("mm/swap: don't SetPageWorkingset unconditionally during swapin")
> 
> Reported-by: CGEL <cgel.zte@...il.com>
> Signed-off-by: Johannes Weiner <hannes@...xchg.org>

Acked-by: Minchan Kim <minchan@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ