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>] [day] [month] [year] [list]
Message-ID: <YE8Dj4uSPDE6HYM1@google.com>
Date:   Mon, 15 Mar 2021 00:49:51 -0600
From:   Yu Zhao <yuzhao@...gle.com>
To:     Hillf Danton <hdanton@...a.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Mel Gorman <mgorman@...e.de>, page-reclaim@...gle.com,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v1 00/14] Multigenerational LRU

On Mon, Mar 15, 2021 at 09:13:50AM +0800, Hillf Danton wrote:
> On Sat, 13 Mar 2021 00:57:33 -0700 Yu Zhao wrote:
> > TLDR
> > ====
> > The current page reclaim is too expensive in terms of CPU usage and
> > often making poor choices about what to evict. We would like to offer
> > a performant, versatile and straightforward augment.
> 
> It makes my day, Monday of thick smog in one of the far east big
> cities, to read the fresh work, something like 0b0695f2b34a that removed
> heuristics as much as possible, of a coming Mr. Kswapd. 

Hi Hillf!

Sorry to hear about the smog, we don't have smog, only a few feet of
snow...

I shared the latest version of the cover letter here, if you are a fan
of Google Docs:
https://docs.google.com/document/d/1UxcpPAFNk1KpTJDKDXWekj_n6ebpQ-cwbXZlYoebTVM

And speaking of heuristics, yeah, I totally understand. We've had more
than fair share of problems with get_scan_count() and
inactive_is_low(). And we are still carrying a workaround (admittedly
a terrible one) we posted more that a decade ago, on some of our old
kernel versions:
https://lore.kernel.org/linux-mm/20101028191523.GA14972@google.com/

And people who run the Chrome browser but don't have this patch (non-
Chrome OS) had problems!
https://lore.kernel.org/linux-mm/54C77086.7090505@suse.cz/

With generation numbers, the equivalent to inactive_is_low() is

  max_seq - min(min_seq[!swappiness], min_seq[1]) + 1 > MIN_NR_GENS

in get_nr_to_scan(); and the equivalent to get_scan_count() is

  *file = !swappiness || min_seq[0] > min_seq[1] ||
	  (min_seq[0] == min_seq[1] &&
	   max(lruvec->evictable.isolated[0], 1UL) * (200 - swappiness) >
	   max(lruvec->evictable.isolated[1], 1UL) * (swappiness - 1));

in isolate_lru_gen_pages(), both in the 10th patch.

They work amazingly well for us, and hopefully for you too :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ