Re: [RFC PATCH 5/5] GHES: Make NMI handler have a single reader

From: Borislav Petkov
Date: Tue Apr 28 2015 - 12:22:56 EST

On Tue, Apr 28, 2015 at 11:35:21AM -0400, Don Zickus wrote:
> Your solution seems much simpler. :-)

... and I love simpler :-)

> I followed up in another email stating I mis-spoke. I forgot this still
> uses the NMI_LOCAL shared NMI. So every perf NMI, will also call the GHES
> handler to make sure NMIs did not piggy back each other. So I don't believe

And this is something we should really fix - perf and RAS should
not have anything to do with each other. But I don't know the NMI
code to even have an idea how. I don't even know whether we can
differentiate NMIs, hell, I can't imagine the hardware giving us a
different NMI reason through get_nmi_reason(). Maybe that byte returned
from NMI_REASON_PORT is too small and hangs on too much legacy crap to
even be usable. Questions over questions...

> the NMI reason lock is called a majority of the time (except when the NMI is
> swallowed, but that is under heavy perf load...).


> We both agree the mechanics of the spinlock are overkill here and cause much
> cache contention. Simplifying it to just 'reads' and return removes most of
> the problem.



ECO tip #101: Trim your mails when you reply.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at