From: "Luck, Tony" <tony.luck@intel.com>
To: "chu, jane" <jane.chu@oracle.com>, Jiaqi Yan <jiaqiyan@google.com>
Cc: "nao.horiguchi@gmail.com" <nao.horiguchi@gmail.com>,
"linmiaohe@huawei.com" <linmiaohe@huawei.com>,
"wangkefeng.wang@huawei.com" <wangkefeng.wang@huawei.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"osalvador@suse.de" <osalvador@suse.de>,
"rientjes@google.com" <rientjes@google.com>,
"duenwen@google.com" <duenwen@google.com>,
"jthoughton@google.com" <jthoughton@google.com>,
"jgg@nvidia.com" <jgg@nvidia.com>,
"ankita@nvidia.com" <ankita@nvidia.com>,
"peterx@redhat.com" <peterx@redhat.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: RE: [RFC PATCH v1 1/2] mm/memory-failure: introduce global MFR policy
Date: Fri, 11 Oct 2024 19:44:34 +0000 [thread overview]
Message-ID: <SJ1PR11MB6083CB74284F57A52989E458FC792@SJ1PR11MB6083.namprd11.prod.outlook.com> (raw)
In-Reply-To: <aa42865e-faab-4199-b80b-8fd15aae3ed7@oracle.com>
> Something like by way of userfaultfd, kernel provides a new/clean
> hugetlb page, copied over good data from the clean subpages and then
> present the clean hugetlb page to user process with indication that
> subpage x is a substitute of the poisoned old subpage x, hence its data
> might need a refill? I am not sure how exactly to pull this through as
> the even is not a page-fault, but just wondering whether something like
> this is possible.
This requires serious levels of sophistication from the application.
If some thread still accesses the "lost" data, there's no signal that
anything went wrong. It just reads whatever data the kernel filled the
poisoned area with. For some applications there might be some
data pattern that would help track this down. But no general answer.
On the plus side, the amount of "lost" data need not be a page.
On Intel the poison unit is a cache line (64 bytes). So more of the
original data can potentially be preserved. This might be useful
for applications using regular pages as well as those using huge pages.
When Linux first implemented recovery, we had hopes that applications
like databases would be able to implement their own recovery. Losing
a whole page turned out to be problematic as in some implementations
the metadata for a database entry was stored at the start of the memory
block. So the SIGBUS would provide the virtual address, and it wasn't
of any practical use to determine which data structure(s) were affected
without some massive restructure of the code to separate metadata
from data.
-Tony
next prev parent reply other threads:[~2024-10-11 19:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 4:39 [RFC PATCH v1 0/2] Userspace Can Control Memory Failure Recovery Jiaqi Yan
2024-09-24 4:39 ` [RFC PATCH v1 1/2] mm/memory-failure: introduce global MFR policy Jiaqi Yan
2024-10-02 23:50 ` jane.chu
2024-10-03 23:51 ` Jiaqi Yan
2024-10-07 17:24 ` jane.chu
2024-10-10 23:21 ` Jiaqi Yan
2024-10-11 18:28 ` jane.chu
2024-10-11 19:44 ` Luck, Tony [this message]
2024-10-11 20:15 ` jane.chu
2024-10-15 23:45 ` Jiaqi Yan
2024-10-15 23:56 ` Luck, Tony
2024-10-16 0:19 ` jane.chu
2024-10-11 7:04 ` Miaohe Lin
2024-10-15 23:58 ` Jiaqi Yan
2024-09-24 4:39 ` [RFC PATCH v1 2/2] docs: mm: add enable_hard_offline sysctl Jiaqi Yan
2024-10-02 15:02 ` [RFC PATCH v1 0/2] Userspace Can Control Memory Failure Recovery Jason Gunthorpe
2024-10-03 22:45 ` Jiaqi Yan
2024-10-03 22:58 ` Luck, Tony
2024-10-03 23:19 ` Jiaqi Yan
2024-10-03 23:19 ` Jason Gunthorpe
2024-10-04 18:32 ` Jiaqi Yan
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=SJ1PR11MB6083CB74284F57A52989E458FC792@SJ1PR11MB6083.namprd11.prod.outlook.com \
--to=tony.luck@intel.com \
--cc=akpm@linux-foundation.org \
--cc=ankita@nvidia.com \
--cc=duenwen@google.com \
--cc=jane.chu@oracle.com \
--cc=jgg@nvidia.com \
--cc=jiaqiyan@google.com \
--cc=jthoughton@google.com \
--cc=linmiaohe@huawei.com \
--cc=linux-mm@kvack.org \
--cc=nao.horiguchi@gmail.com \
--cc=osalvador@suse.de \
--cc=peterx@redhat.com \
--cc=rientjes@google.com \
--cc=wangkefeng.wang@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