linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: wangxuewen <18810879172@163.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	wangxuewen <wangxuewen@kylinos.cn>, <nao.horiguchi@gmail.com>,
	<akpm@linux-foundation.org>
Subject: Re: [PATCH v1] mm/memory-failure: replace magic number 3 with GET_PAGE_MAX_RETRY_NUM
Date: Fri, 3 Apr 2026 10:19:29 +0800	[thread overview]
Message-ID: <b1b37da0-c93a-80a6-d733-d6051b42cbd4@huawei.com> (raw)
In-Reply-To: <20260402064946.1124250-1-18810879172@163.com>

On 2026/4/2 14:49, wangxuewen wrote:
> From: wangxuewen <wangxuewen@kylinos.cn>
> 
> Replace the hardcoded magic number 3 in get_any_page() with the
> existing GET_PAGE_MAX_RETRY_NUM macro for code consistency and
> maintainability.
> 
> This change has no functional impact, only improves code readability
> and unifies the retry limit configuration.
> 
> Signed-off-by: wangxuewen <wangxuewen@kylinos.cn>

Acked-by: Miaohe Lin <linmiaohe@huawei.com>

Thanks.
.

> ---
>  mm/memory-failure.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index ee42d4361309..e5a6b1353d9e 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1418,7 +1418,7 @@ static int get_any_page(struct page *p, unsigned long flags)
>  			 * We raced with (possibly temporary) unhandlable
>  			 * page, retry.
>  			 */
> -			if (pass++ < 3) {
> +			if (pass++ < GET_PAGE_MAX_RETRY_NUM) {
>  				shake_page(p);
>  				goto try_again;
>  			}
> 



      parent reply	other threads:[~2026-04-03  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-02  6:49 wangxuewen
2026-04-03  0:36 ` SeongJae Park
2026-04-03  2:19 ` Miaohe Lin [this message]

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=b1b37da0-c93a-80a6-d733-d6051b42cbd4@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=18810879172@163.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nao.horiguchi@gmail.com \
    --cc=wangxuewen@kylinos.cn \
    /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