Re: [PATCH] mm: vmscan: do not skip CMA while LRU is full of CMA folios

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 08, 2024 at 04:05:39PM +0800, liuhailong@xxxxxxxx wrote:
> From: liuhailong <liuhailong@xxxxxxxx>
> @@ -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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux