From: "HORIGUCHI NAOYA(堀口 直也)" <naoya.horiguchi@nec.com>
To: wangbin <wangbin224@huawei.com>, Mike Kravetz <mike.kravetz@oracle.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Naoya Horiguchi <nao.horiguchi@gmail.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"wuxu.wu@huawei.com" <wuxu.wu@huawei.com>
Subject: Re: [PATCH] mm: hugetlbfs: add hwcrp_hugepages to record memory failure on hugetlbfs
Date: Tue, 8 Jun 2021 08:01:12 +0000 [thread overview]
Message-ID: <20210608080112.GA942548@hori.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <b4a6c7ee-5b0c-2390-35c5-3a5255d77f5d@oracle.com>
Thanks for forwarding the message, Mike.
On Mon, Jun 07, 2021 at 12:13:03PM -0700, Mike Kravetz wrote:
> Resend with new e-mail for Naoya
>
> On 6/7/21 7:16 AM, wangbin wrote:
> > From: Bin Wang <wangbin224@huawei.com>
> >
> > In the current hugetlbfs memory failure handler, reserved huge page
> > counts are used to record the number of huge pages with hwposion.
>
> I do not believe this is an accurate statement. Naoya is the memory
> error expert and may disagree, but I do not see anywhere where reserve
> counts are being used to track huge pages with memory errors.
And Mike is right, hugetlb's reservation count is not linked
to accounting of hwpoisoned pages.
>
> IIUC, the routine hugetlbfs_error_remove_page is called after
> unmapping the page from all user mappings. The routine will simply,
> remove the page from the cache. This effectively removes the page
> from the file as hugetlbfs is a memory only filesystem. The subsequent
> call to hugetlb_unreserve_pages cleans up any reserve map entries
> associated with the page and adjusts the reserve count if necessary.
> The reserve count adjustment is based on removing the page from the
> file, rather than the memory error. The same adjustment would be made
> if the page was hole punched from the file.
This logic totally makes sense to me.
Unmapping done in memory_failure() might increment the reserve count,
but that's the cancel of the consumed reservation by unmapping.
Thanks,
Naoya Horigcuhi
prev parent reply other threads:[~2021-06-08 8:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 14:16 wangbin
2021-06-07 19:07 ` Mike Kravetz
2021-06-07 19:13 ` Mike Kravetz
2021-06-08 2:24 ` wangbin
2021-06-08 9:13 ` HORIGUCHI NAOYA(堀口 直也)
2021-06-09 2:23 ` wangbin
2021-06-08 8:01 ` HORIGUCHI NAOYA(堀口 直也) [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=20210608080112.GA942548@hori.linux.bs1.fc.nec.co.jp \
--to=naoya.horiguchi@nec.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=nao.horiguchi@gmail.com \
--cc=wangbin224@huawei.com \
--cc=wuxu.wu@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox