From: Mike Kravetz <mike.kravetz@oracle.com>
To: "HORIGUCHI NAOYA(堀口 直也)" <naoya.horiguchi@nec.com>
Cc: James Houghton <jthoughton@google.com>,
Muchun Song <songmuchun@bytedance.com>,
Miaohe Lin <linmiaohe@huawei.com>,
Andrew Morton <akpm@linux-foundation.org>,
Yang Shi <shy828301@gmail.com>,
Axel Rasmussen <axelrasmussen@google.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hugetlbfs: don't delete error page from pagecache
Date: Fri, 4 Nov 2022 06:27:44 -0700 [thread overview]
Message-ID: <Y2UTUNBHVY5U9si2@monkey> (raw)
In-Reply-To: <20221104021035.GA297167@hori.linux.bs1.fc.nec.co.jp>
On 11/04/22 02:10, HORIGUCHI NAOYA(堀口 直也) wrote:
> On Tue, Oct 18, 2022 at 08:01:25PM +0000, James Houghton wrote:
> > This change is very similar to the change that was made for shmem [1],
> > and it solves the same problem but for HugeTLBFS instead.
> >
> > Currently, when poison is found in a HugeTLB page, the page is removed
> > from the page cache. That means that attempting to map or read that
> > hugepage in the future will result in a new hugepage being allocated
> > instead of notifying the user that the page was poisoned. As [1] states,
> > this is effectively memory corruption.
> >
> > The fix is to leave the page in the page cache. If the user attempts to
> > use a poisoned HugeTLB page with a syscall, the syscall will fail with
> > EIO, the same error code that shmem uses. For attempts to map the page,
> > the thread will get a BUS_MCEERR_AR SIGBUS.
> >
> > [1]: commit a76054266661 ("mm: shmem: don't truncate page if memory failure happens")
> >
> > Signed-off-by: James Houghton <jthoughton@google.com>
>
> I did some testing and found no issue. So I agree with this patch.
> Thank you very much.
>
> Tested-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
> Reviewed-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
>
> As for whether to go with HGM patchset or not, I have no strong opinion.
> As you stated in another email this patch is correct without HGM patch,
> so it's OK to me to make this merged first.
Thanks Naoya.
This is a late thought, but ...
Should this patch and Yang Shi's shmem patch be backported to stable releases?
Both address potential data corruption/loss, so it certainly seems like
stable material.
--
Mike Kravetz
next prev parent reply other threads:[~2022-11-04 13:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 20:01 [PATCH] hugetlbfs: don't delete error page from pagecache James Houghton
2022-10-19 18:31 ` Yang Shi
2022-10-19 18:42 ` James Houghton
2022-10-20 18:27 ` Yang Shi
2022-10-19 18:55 ` Mike Kravetz
2022-10-20 18:42 ` Yang Shi
2022-10-20 0:02 ` Mike Kravetz
2022-11-04 2:10 ` HORIGUCHI NAOYA(堀口 直也)
2022-11-04 13:27 ` Mike Kravetz [this message]
2022-11-07 4:25 ` HORIGUCHI NAOYA(堀口 直也)
2022-11-07 16:55 ` Mike Kravetz
2022-11-07 19:41 ` Andrew Morton
2022-11-07 18:50 ` Yang Shi
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=Y2UTUNBHVY5U9si2@monkey \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=jthoughton@google.com \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.com \
--cc=shy828301@gmail.com \
--cc=songmuchun@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.