From: Rik van Riel <riel@surriel.com>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: linux-mm@kvack.org, kernel-team@fb.com,
Oscar Salvador <osalvador@suse.de>,
Naoya Horiguchi <naoya.horiguchi@nec.com>,
Mel Gorman <mgorman@suse.de>,
Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
stable@vger.kernel.org,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm,hwpoison: unmap poisoned page before invalidation
Date: Sun, 27 Mar 2022 22:24:08 -0400 [thread overview]
Message-ID: <1d4dc5f732e8da263c2a2e783e4550419cfb0c7b.camel@surriel.com> (raw)
In-Reply-To: <e3e3ae0f-50f6-6b13-c520-26aac353e0cb@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
On Mon, 2022-03-28 at 10:14 +0800, Miaohe Lin wrote:
> On 2022/3/27 4:14, Rik van Riel wrote:
>
>
> >
> > > > /* Retry if a clean page was removed
> > > > from
> > > > the cache. */
> > > > - if (invalidate_inode_page(vmf->page))
> > > > - poisonret = 0;
> > > > - unlock_page(vmf->page);
> > > > + if (invalidate_inode_page(page))
> > > > + poisonret = VM_FAULT_NOPAGE;
> > > > + unlock_page(page);
> >
>
> Sure, but when I think more about this, it seems this fix isn't
> ideal:
> If VM_FAULT_NOPAGE is returned with page table unset, the process
> will
> re-trigger page fault again and again until invalidate_inode_page
> succeeds
> to evict the inode page. This might hang the process a really long
> time.
> Or am I miss something?
>
If invalidate_inode_page fails, we will return
VM_FAULT_HWPOISON, and kill the task, instead
of looping indefinitely.
--
All Rights Reversed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-03-28 2:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-25 20:14 [PATCH] mm,hwpoison: unmap poisoned page before invalidation Rik van Riel
2022-03-26 7:48 ` Miaohe Lin
2022-03-26 20:14 ` Rik van Riel
2022-03-28 2:14 ` Miaohe Lin
2022-03-28 2:24 ` Rik van Riel [this message]
2022-03-28 2:41 ` Miaohe Lin
2022-03-28 9:00 ` Oscar Salvador
2022-03-29 15:49 ` Rik van Riel
2022-03-29 19:13 ` Oscar Salvador
2022-03-28 11:01 ` HORIGUCHI NAOYA(堀口 直也)
2022-03-29 19:13 ` 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=1d4dc5f732e8da263c2a2e783e4550419cfb0c7b.camel@surriel.com \
--to=riel@surriel.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=naoya.horiguchi@nec.com \
--cc=osalvador@suse.de \
--cc=stable@vger.kernel.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