diff options
author | Peter Zijlstra <[email protected]> | 2013-10-24 12:52:06 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2013-10-29 12:02:54 +0100 |
commit | e00b12e64be9a34ef071de7b6052ca9ea29dd460 (patch) | |
tree | 2f3395d06d639550039f3c9aa69c4ad0a4854327 /net/lapb/lapb_iface.c | |
parent | 2c42cfbfe10872929c2ba1f8130e31063ff59b94 (diff) |
perf/x86: Further optimize copy_from_user_nmi()
Now that we can deal with nested NMI due to IRET re-enabling NMIs and
can deal with faults from NMI by making sure we preserve CR2 over NMIs
we can in fact simply access user-space memory from NMI context.
So rewrite copy_from_user_nmi() to use __copy_from_user_inatomic() and
rework the fault path to do the minimal required work before taking
the in_atomic() fault handler.
In particular avoid perf_sw_event() which would make perf recurse on
itself (it should be harmless as our recursion protections should be
able to deal with this -- but why tempt fate).
Also rename notify_page_fault() to kprobes_fault() as that is a much
better name; there is no notifier in it and its specific to kprobes.
Don measured that his worst case NMI path shrunk from ~300K cycles to
~150K cycles.
Cc: Stephane Eranian <[email protected]>
Cc: [email protected]
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: [email protected]
Tested-by: Don Zickus <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions