Re: [PATCH] [13/16] HWPOISON: The high level memory error handler in the VM v3

Russ Anderson
2009-05-28T16:56:41Z

On Thu, May 28, 2009 at 03:45:20PM +0200, Andi Kleen wrote:
> On Thu, May 28, 2009 at 02:08:54PM +0200, Nick Piggin wrote:
> > > > > + printk(KERN_ERR "MCE: Out of memory while machine check handling\n");
> > > > > + return;
> > > > > + }
> > > > > + }
> > > > > + tk->addr = page_address_in_vma(p, vma);
> > > > > + if (tk->addr == -EFAULT) {
> > > > > + printk(KERN_INFO "MCE: Failed to get address in VMA\n");
> > > >
> > > > I don't know if this is very helpful message. I could legitimately happen and
> > > > nothing anybody can do about it...
> > >
> > > Can you suggest a better message?
> >
> > Well, for userspace, nothing? At the very least ratelimited, and preferably
> > telling a more high level of what the problem and consequences are.
>
> I changed it to
>
> "MCE: Unable to determine user space address during error handling\n")
>
> Still not perfect, but hopefully better.

Is it even worth having a message at all? Does the fact that page_address_in_vma()
failed change the behavior in any way? (Does tk->addr == 0 matter?) From
a quick scan of the code I do not believe it does.

If the message is for developers/debugging, it would be nice to have more
information, such as why did page_address_in_vma() return -EFAULT. If
that is important, page_address_in_vma() sould return a different failure
status for each of the three failing conditions. But that would only
be needed if the code (potentially) was going to do some additional handling.

Thanks,
--
Russ Anderson, OS RAS/Partitioning Project Lead
SGI - Silicon Graphics Inc rja@sgi.com