Re: [patch 1/2] x86_64 page fault NMI-safe

Mathieu Desnoyers
2010-07-14T20:05:58Z

* Andi Kleen (andi@firstfloor.org) wrote:
> > or similar. Wouldn't that be nice to have as a capability?
>
> It means the NMI watchdog would get useless if these areas
> become common.
>
> Again I suspect all of this is not really needed anyways if
> vmalloc_sync_all() works properly. That would solve the original
> problem Mathieu was trying to solve for per_cpu data. The rule
> would be just to call vmalloc_sync_all() properly when changing
> per CPU data too.

Yep, that would solve the page fault in nmi problem altogether without adding
complexity.

>
> In fact I'm pretty sure it worked originally. Perhaps it regressed?

I'd first ask the obvious to Perf authors: does perf issue vmalloc_sync_all()
between percpu data allocation and tracing activation ? The generic ring buffer
library I posted last week does it already as a precaution for this very
specific reason (making sure NMIs never trigger page faults).

Thanks,

Mathieu

>
> -Andi
> --
> ak@linux.intel.com -- Speaking for myself only.

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.