linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "HORIGUCHI NAOYA(堀口 直也)" <naoya.horiguchi@nec.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] mm: memory-failure: kill soft_offline_free_page()
Date: Fri, 19 Aug 2022 06:47:16 +0000	[thread overview]
Message-ID: <20220819064716.GG613144@hori.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <20220819033402.156519-1-wangkefeng.wang@huawei.com>

On Fri, Aug 19, 2022 at 11:34:01AM +0800, Kefeng Wang wrote:
> Open-code the page_handle_poison() into soft_offline_page() and
> kill unneeded soft_offline_free_page().
> 
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Thank you for sending cleanup patches.
This patch looks good to me,

Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>

> ---
>  mm/memory-failure.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index e48f6f6a259d..1a7d6548ccb2 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -2511,16 +2511,6 @@ static int soft_offline_in_use_page(struct page *page)
>  	return __soft_offline_page(page);
>  }
>  
> -static int soft_offline_free_page(struct page *page)
> -{
> -	int rc = 0;
> -
> -	if (!page_handle_poison(page, true, false))
> -		rc = -EBUSY;
> -
> -	return rc;
> -}
> -
>  static void put_ref_page(struct page *page)
>  {
>  	if (page)
> @@ -2598,7 +2588,7 @@ int soft_offline_page(unsigned long pfn, int flags)
>  	if (ret > 0) {
>  		ret = soft_offline_in_use_page(page);
>  	} else if (ret == 0) {
> -		if (soft_offline_free_page(page) && try_again) {
> +		if (!page_handle_poison(page, true, false) && try_again) {
>  			try_again = false;
>  			flags &= ~MF_COUNT_INCREASED;
>  			goto retry;
> -- 
> 2.35.3

  parent reply	other threads:[~2022-08-19  6:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  3:34 Kefeng Wang
2022-08-19  3:34 ` [PATCH 2/2] mm: memory-failure: kill __soft_offline_page() Kefeng Wang
2022-08-19  6:48   ` HORIGUCHI NAOYA(堀口 直也)
2022-08-19  7:40   ` Miaohe Lin
2022-08-30  7:15   ` HORIGUCHI NAOYA(堀口 直也)
2022-08-30  9:26     ` Kefeng Wang
2022-08-19  6:47 ` HORIGUCHI NAOYA(堀口 直也) [this message]
2022-08-19  7:39 ` [PATCH 1/2] mm: memory-failure: kill soft_offline_free_page() Miaohe Lin

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=20220819064716.GG613144@hori.linux.bs1.fc.nec.co.jp \
    --to=naoya.horiguchi@nec.com \
    --cc=akpm@linux-foundation.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=wangkefeng.wang@huawei.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