[IA64] Reschedule break_fault() for better performance.
authorDavid Mosberger-Tang <davidm@hpl.hp.com>
Thu, 28 Apr 2005 04:19:04 +0000 (21:19 -0700)
committerTony Luck <tony.luck@intel.com>
Thu, 28 Apr 2005 04:19:04 +0000 (21:19 -0700)
commitf8fa5448fc9b4a7806b1297a0b57808f12fe4d43
treeb32f9939ee3b72010e4c3255d58278f85c547a7e
parentc03f058fbf685f2ff630095d2c1e98d331b81e82
[IA64] Reschedule break_fault() for better performance.

This patch reorganizes break_fault() to optimistically assume that a
system-call is being performed from user-space (which is almost always
the case).  If it turns out that (a) we're not being called due to a
system call or (b) we're being called from within the kernel, we fixup
the no-longer-valid assumptions in non_syscall() and .break_fixup(),
respectively.

With this approach, there are 3 major phases:

 - Phase 1: Read various control & application registers, in
    particular the current task pointer from AR.K6.
 - Phase 2: Do all memory loads (load system-call entry,
    load current_thread_info()->flags, prefetch
    kernel register-backing store) and switch
    to kernel register-stack.
 - Phase 3: Call ia64_syscall_setup() and invoke
    syscall-handler.

Good for 26-30 cycles of improvement on break-based syscall-path.

Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/ivt.S