This new hack directly slows down every context switch instead of every page fault -- the latter is a less important perf hit.
Author: dgorbachev
Date: Mon Feb 23 16:18:28 2009
New Revision: 39723
URL: http://svn.reactos.org/svn/reactos?rev=39723&view=rev
Log:
Remove a hack from KiTrap14. Put a hack in other place.
Modified:
trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S
trunk/reactos/ntoskrnl/ke/i386/trap.s
Modified: trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S?rev=39723&r1=39722&r2=39723&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S [iso-8859-1] Mon Feb 23 16:18:28 2009
@@ -389,6 +389,9 @@
/* Checking NPX, disable interrupts now */
mov eax, [esi+KTHREAD_INITIAL_STACK]
+
+ /* HACK */
+ mov ecx, [eax - 4]
cli
/* Get the NPX State */
Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?rev=39723&r1=39722&r2=39723&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/trap.s [iso-8859-1] Mon Feb 23 16:18:28 2009
@@ -1924,10 +1924,6 @@
NoFixUp:
mov edi, cr2
- /* ROS HACK: Sometimes we get called with INTS DISABLED! WTF? */
- test dword ptr [ebp+KTRAP_FRAME_EFLAGS], EFLAGS_INTERRUPT_MASK
- je HandlePf
-
/* Enable interrupts and check if we got here with interrupts disabled */
sti
test dword ptr [ebp+KTRAP_FRAME_EFLAGS], EFLAGS_INTERRUPT_MASK