[lkml]   [2015]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 5/5] GHES: Make NMI handler have a single reader
On Fri, 27 Mar 2015, Borislav Petkov wrote:

> From: Jiri Kosina <>
> Since GHES sources are global, we theoretically need only a single CPU
> reading them per NMI instead of a thundering herd of CPUs waiting on a
> spinlock in NMI context for no reason at all.

I originally wasn't 100% sure whether GHES sources are global (i.e. if it
really doesn't matter which CPU is reading the registers), but looking at
the code more it actually seems that this is really the right thing to do.

Rationale: ghes_ioremap_pfn_nmi() always ioremaps() (exclusively) the page
with the registers, performs apei_read() (which is ghes-source specific,
but not CPU-specific) and unmaps the page again.

There is nothing that would make this CPU-specific. Adding Huang Ying (the
original author of the code) to confirm this. Huang?

> Do that.

I think this should indeed be pushed forward. It fixes horrible spinlock
contention on systems which are under NMI storm (such as when perf is
active) unrelated to GHES.


Jiri Kosina

 \ /
  Last update: 2015-04-01 10:21    [W:0.165 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site