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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 22 Feb 2024 12:27:56 +0900
From: Byungchul Park <byungchul@...com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Yu Zhao <yuzhao@...gle.com>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, kernel_team@...ynix.com
Subject: Re: [PATCH] mm, vmscan: Don't turn on cache_trim_mode at the highest
 scan priority

On Wed, Feb 21, 2024 at 02:30:13PM -0800, Andrew Morton wrote:
> On Sat, 17 Feb 2024 00:11:25 -0500 Yu Zhao <yuzhao@...gle.com> wrote:
> 
> > On Fri, Feb 16, 2024 at 2:24 AM Byungchul Park <byungchul@...com> wrote:
> > >
> > > On Fri, Feb 16, 2024 at 12:55:17AM -0500, Yu Zhao wrote:
> > > > On Thu, Feb 8, 2024 at 1:18 AM Byungchul Park <byungchul@...com> wrote:
> > > > >
> > > > > With cache_trim_mode on, reclaim logic doesn't bother reclaiming anon
> > > > > pages. However, it should be more careful to turn on the mode because
> > > > > it's going to prevent anon pages from reclaimed even if there are huge
> > > > > ammount of anon pages that are very cold so should be reclaimed. Even
> > > > > worse, that can lead kswapd_failures to be MAX_RECLAIM_RETRIES and stop
> > > > > until direct reclaim eventually works to resume kswapd.
> > > >
> > > > Is a theory or something observed in the real world? If it's the
> > > > former, would this change risk breaking existing use cases? It's the
> > >
> > > I faced the latter case.
> > >
> > > > latter, where are the performance numbers to show what it looks like
> > > > before and after this patch?
> > 
> > Let me ask again: where are the performance numbers to show what it
> > looks like before and after this patch?
> > 
> > > Before:
> > >
> > > Whenever the system meets the condition to turn on cache_trim_mode but
> > > few cache pages to trim, kswapd fails without scanning anon pages that
> > > are plenty and cold for sure and it retries 8 times and looks *stopped
> > > for ever*.
> 
> Does "stopped for ever" mean that kswapd simply stops functioning?

Yes. kswapd stops its functioning. Even worse, after being stopped, any
request to wake up kswapd fails until ->kswapd_failures gets reset to 0
by direct reclaim or something.

It's more like a bug fix than a performance improvement.

> If so, that's a pretty serious issue.  Please fully describe all of
> this in the changelog.  Please also address Yu Zhao's review comments
> and send us a v2 patch?  Thanks.

I will post v2 with vmstat numbers between before and after.

	Byungchul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ