2024-05-16 09:07:46

by Oscar Salvador

[permalink] [raw]
Subject: Re: [PATCH v2] mm/huge_memory: don't unpoison huge_zero_folio

On Thu, May 16, 2024 at 04:45:22PM +0800, Miaohe Lin wrote:
> Thanks for your comment. Do you mean something like below?
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 16ada4fb02b7..a9fe9eda593f 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -2546,6 +2546,13 @@ int unpoison_memory(unsigned long pfn)
> goto unlock_mutex;
> }
>
> + if (is_huge_zero_folio(folio)) {
> + unpoison_pr_info("Unpoison: huge zero page is not supported %#lx\n",
> + pfn, &unpoison_rs);
> + ret = -EOPNOTSUPP;
> + goto unlock_mutex;
> + }
> +
> if (!PageHWPoison(p)) {
> unpoison_pr_info("Unpoison: Page was already unpoisoned %#lx\n",
> pfn, &unpoison_rs);

Yes, something like that makes much more sense to me.


Thanks

--
Oscar Salvador
SUSE Labs