Message ID | 20240924043924.3562257-1-jiaqiyan@google.com (mailing list archive) |
---|---|
Headers | show |
Series | Userspace Can Control Memory Failure Recovery | expand |
On Tue, Sep 24, 2024 at 04:39:18AM +0000, Jiaqi Yan wrote: > So far I personally prefer the global MFR policy but open to feedbacks to both > options, or new ideas. Why? It seems more natural that only processe that can handle the SIGBUS semantics would opt into them? Jason
Hi Jason, On Wed, Oct 2, 2024 at 8:02 AM Jason Gunthorpe <jgg@nvidia.com> wrote: > > On Tue, Sep 24, 2024 at 04:39:18AM +0000, Jiaqi Yan wrote: > > > So far I personally prefer the global MFR policy but open to feedbacks to both > > options, or new ideas. > > Why? It seems more natural that only processe that can handle the > SIGBUS semantics would opt into them? Are you suggesting you prefer the per-VMA policy, or proposing a new "per-process policy" added via prctl? By "per-process", I imagine the policy to keep or offline the poisoned page will apply to all its VMAs? > > Jason Thanks, Jiaqi
> Are you suggesting you prefer the per-VMA policy, or proposing a new > "per-process policy" added via prctl? By "per-process", I imagine the > policy to keep or offline the poisoned page will apply to all its > VMAs? A "per-process policy" using prctl already exists. See prctl(PR_MCE_KILL). Currently used to choose whether to eagerly send SIGBUS to a process when a memory error is discovered asynchronously by a h/w patrol scrubber. What is the use case for a per-VMA policy? Do you have some application that would like to use this? -Tony
Hi Tony, On Thu, Oct 3, 2024 at 3:58 PM Luck, Tony <tony.luck@intel.com> wrote: > > > Are you suggesting you prefer the per-VMA policy, or proposing a new > > "per-process policy" added via prctl? By "per-process", I imagine the > > policy to keep or offline the poisoned page will apply to all its > > VMAs? > > A "per-process policy" using prctl already exists. See prctl(PR_MCE_KILL). The policy I want to have is not about "whether to send SIGBUS or not" or "when to send SIGBUS", it is about whether to offline the error [huge]page or keep it accessible by the process. > Currently used to choose whether to eagerly send SIGBUS to a process > when a memory error is discovered asynchronously by a h/w patrol scrubber. > > What is the use case for a per-VMA policy? Do you have some application > that would like to use this? Our main use case is the virtual machine monitor and VM. VMM can track the *guest* physical addresses that are affected by the *host* physical addresses having errors. We'd like the VM to be able to continue loading guest data from the error [huge]page. Loading the clean portion should just work; loading the poisoned portion will be intercepted by KVM + VMM without going down to kernel / firmware / hardware. > > -Tony
On Thu, Oct 03, 2024 at 03:45:09PM -0700, Jiaqi Yan wrote: > Hi Jason, > > On Wed, Oct 2, 2024 at 8:02 AM Jason Gunthorpe <jgg@nvidia.com> wrote: > > > > On Tue, Sep 24, 2024 at 04:39:18AM +0000, Jiaqi Yan wrote: > > > > > So far I personally prefer the global MFR policy but open to feedbacks to both > > > options, or new ideas. > > > > Why? It seems more natural that only processe that can handle the > > SIGBUS semantics would opt into them? > > Are you suggesting you prefer the per-VMA policy, or proposing a new > "per-process policy" added via prctl? By "per-process", I imagine the > policy to keep or offline the poisoned page will apply to all its > VMAs? I'm just asking why you "personally prefer" as the direction seems a bit awkward Jason
On Thu, Oct 3, 2024 at 4:20 PM Jason Gunthorpe <jgg@nvidia.com> wrote: > > On Thu, Oct 03, 2024 at 03:45:09PM -0700, Jiaqi Yan wrote: > > Hi Jason, > > > > On Wed, Oct 2, 2024 at 8:02 AM Jason Gunthorpe <jgg@nvidia.com> wrote: > > > > > > On Tue, Sep 24, 2024 at 04:39:18AM +0000, Jiaqi Yan wrote: > > > > > > > So far I personally prefer the global MFR policy but open to feedbacks to both > > > > options, or new ideas. > > > > > > Why? It seems more natural that only processe that can handle the > > > SIGBUS semantics would opt into them? > > > > Are you suggesting you prefer the per-VMA policy, or proposing a new > > "per-process policy" added via prctl? By "per-process", I imagine the > > policy to keep or offline the poisoned page will apply to all its > > VMAs? > > I'm just asking why you "personally prefer" as the direction seems a > bit awkward I assume the "awkward" comes from the concern of what userspace will do if the kernel is configured to keep poisoned pages. Admittedly this direction is the high return-on-invest one for me, as we already have memory failure recovery and repair in userspace to work well with poisoned pages not offlined until hw is repaired. But I don't assume it is the also case for everyone else, so I also want to propose alternative (limit to just VMA, or memory owned by process, and limit to their lifetime) that hope work for more people. > > Jason