linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Naoya Horiguchi <naoya.horiguchi@nec.com>
Subject: Re: [PATCH] mm/hwpoison: Check the subpage, not the head page
Date: Tue, 1 Feb 2022 10:29:05 -0800	[thread overview]
Message-ID: <CAHbLzkrMNo4f=ATeHV=yADjW1yCbmE6jCAC=puhG-=_5j0jymg@mail.gmail.com> (raw)
In-Reply-To: <20220130013042.1906881-1-willy@infradead.org>

On Sat, Jan 29, 2022 at 5:30 PM Matthew Wilcox (Oracle)
<willy@infradead.org> wrote:
>
> Hardware poison is tracked on a per-page basis, not on the head page.

Looks correct to me. Reviewed-by: Yang Shi <shy828301@gmail.com>

>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
>  mm/rmap.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/rmap.c b/mm/rmap.c
> index 6a1e8c7f6213..09b08888120e 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -1553,7 +1553,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
>                 /* Update high watermark before we lower rss */
>                 update_hiwater_rss(mm);
>
> -               if (PageHWPoison(page) && !(flags & TTU_IGNORE_HWPOISON)) {
> +               if (PageHWPoison(subpage) && !(flags & TTU_IGNORE_HWPOISON)) {
>                         pteval = swp_entry_to_pte(make_hwpoison_entry(subpage));
>                         if (PageHuge(page)) {
>                                 hugetlb_count_sub(compound_nr(page), mm);
> @@ -1873,7 +1873,7 @@ static bool try_to_migrate_one(struct page *page, struct vm_area_struct *vma,
>                          * memory are supported.
>                          */
>                         subpage = page;
> -               } else if (PageHWPoison(page)) {
> +               } else if (PageHWPoison(subpage)) {
>                         pteval = swp_entry_to_pte(make_hwpoison_entry(subpage));
>                         if (PageHuge(page)) {
>                                 hugetlb_count_sub(compound_nr(page), mm);
> --
> 2.34.1
>
>


      parent reply	other threads:[~2022-02-01 18:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-30  1:30 Matthew Wilcox (Oracle)
2022-01-30 20:58 ` David Rientjes
2022-01-30 21:14   ` Matthew Wilcox
2022-01-31  5:44     ` HORIGUCHI NAOYA(堀口 直也)
2022-01-31 13:24       ` Matthew Wilcox
2022-01-31 19:24         ` Mike Kravetz
2022-01-31 23:04           ` HORIGUCHI NAOYA(堀口 直也)
2022-02-01 18:29 ` Yang Shi [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='CAHbLzkrMNo4f=ATeHV=yADjW1yCbmE6jCAC=puhG-=_5j0jymg@mail.gmail.com' \
    --to=shy828301@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    --cc=willy@infradead.org \
    /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