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: <ZhOtCtGBSCntUHvR@localhost.localdomain>
Date: Mon, 8 Apr 2024 10:38:34 +0200
From: Oscar Salvador <osalvador@...e.de>
To: liuhailong@...o.com
Cc: akpm@...ux-foundation.org, nathan@...nel.org, ndesaulniers@...gle.com,
	trix@...hat.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	llvm@...ts.linux.dev, surenb@...gle.com, zhaoyang.huang@...soc.com,
	quic_charante@...cinc.com, yuzhao@...gle.com
Subject: Re: [PATCH] mm: vmscan: do not skip CMA while LRU is full of CMA
 folios

On Mon, Apr 08, 2024 at 04:05:39PM +0800, liuhailong@...o.com wrote:
> From: liuhailong <liuhailong@...o.com>
> @@ -6202,6 +6213,16 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist,
>  		 */
>  		if (sc->priority < DEF_PRIORITY - 2)
>  			sc->may_writepage = 1;
> +
> +		/*
> +		 * If we're getting trouble reclaiming non-cma pages and
> +		 * currently a substantial number of CMA pages on LRU,
"sit on LRU" ?

> +		 * start reclaiming cma pages to alleviate other threads
> +		 * and decrease lru size.
> +		 */
> +		if (sc->priority < DEF_PRIORITY - 2 &&
> +		    sc->nr_scanned < (sc->nr_skipped_cma >> 3))

Why "sc->nr_skipped_cma >> 3"? It feels a bit hardcoded.
Maybe the comment or the changelog should contain a reference about why
this "/8" was a good choice.


-- 
Oscar Salvador
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ