linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Oscar Salvador <osalvador@suse.de>
To: liuhailong@oppo.com
Cc: akpm@linux-foundation.org, nathan@kernel.org,
	ndesaulniers@google.com, trix@redhat.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	surenb@google.com, zhaoyang.huang@unisoc.com,
	quic_charante@quicinc.com, yuzhao@google.com
Subject: Re: [PATCH] mm: vmscan: do not skip CMA while LRU is full of CMA folios
Date: Mon, 8 Apr 2024 10:38:34 +0200	[thread overview]
Message-ID: <ZhOtCtGBSCntUHvR@localhost.localdomain> (raw)
In-Reply-To: <20240408080539.14282-1-liuhailong@oppo.com>

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


  parent reply	other threads:[~2024-04-08  8:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  8:05 liuhailong
2024-04-08  8:19 ` Barry Song
2024-04-08  8:38 ` Oscar Salvador [this message]
2024-04-09  4:54   ` 刘海龙(LaoLiu)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZhOtCtGBSCntUHvR@localhost.localdomain \
    --to=osalvador@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuhailong@oppo.com \
    --cc=llvm@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=quic_charante@quicinc.com \
    --cc=surenb@google.com \
    --cc=trix@redhat.com \
    --cc=yuzhao@google.com \
    --cc=zhaoyang.huang@unisoc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox