linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Oscar Salvador <osalvador@suse.de>, akpm@linux-foundation.org
Cc: n-horiguchi@ah.jp.nec.com, vbabka@suse.cz, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm,hwpoison: Return -EBUSY when migration fails
Date: Wed, 9 Dec 2020 10:59:04 +0100	[thread overview]
Message-ID: <a30f4786-7c54-9fa8-0d39-6ae4d10f93c2@redhat.com> (raw)
In-Reply-To: <20201209092818.30417-1-osalvador@suse.de>

On 09.12.20 10:28, Oscar Salvador wrote:
> Currently, we return -EIO when we fail to migrate the page.
> 
> Migrations' failures are rather transient as they can happen due to
> several reasons, e.g: high page refcount bump, mapping->migrate_page
> failing etc.
> All meaning that at that time the page could not be migrated, but
> that has nothing to do with an EIO error.
> 
> Let us return -EBUSY instead, as we do in case we failed to isolate
> the page.
> 
> While are it, let us remove the "ret" print as its value does not change.
> 
> Signed-off-by: Oscar Salvador <osalvador@suse.de>
> ---
>  mm/memory-failure.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 428991e297e2..1942fb83ac64 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1849,11 +1849,11 @@ static int __soft_offline_page(struct page *page)
>  			pr_info("soft offline: %#lx: %s migration failed %d, type %lx (%pGp)\n",
>  				pfn, msg_page[huge], ret, page->flags, &page->flags);
>  			if (ret > 0)
> -				ret = -EIO;
> +				ret = -EBUSY;

Do we expect callers to retry immediately? -EAGAIN might make also
sense. But -EBUSY is an obvious improvement. Do we have callers relying
on this behavior?


-- 
Thanks,

David / dhildenb



  parent reply	other threads:[~2020-12-09  9:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  9:28 Oscar Salvador
2020-12-09  9:57 ` HORIGUCHI NAOYA(堀口 直也)
2020-12-09  9:59 ` David Hildenbrand [this message]
2020-12-09 10:36   ` Oscar Salvador
2020-12-09 10:25 ` Vlastimil Babka
2020-12-09 10:38   ` Oscar Salvador

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=a30f4786-7c54-9fa8-0d39-6ae4d10f93c2@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=osalvador@suse.de \
    --cc=vbabka@suse.cz \
    /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