[ros-svn] [ion] 20794: - Rewrite usermode callbacks. These changes should greatly optimize graphic operations. After these changes, my "idle" CPU Usage in taskmgr went from 7-8% to 4-5%, while on the performace page, from 15-18% to 10-13%:

ion at svn.reactos.org ion at svn.reactos.org
Thu Jan 12 00:55:07 CET 2006


- Rewrite usermode callbacks. These changes should greatly optimize graphic operations. After these changes, my "idle" CPU Usage in taskmgr went from 7-8% to 4-5%, while on the performace page, from 15-18% to 10-13%:
  * Do not use ugly and messy code to create linked stacks and other such resource-wasting steps. Use our newly implemented 60KB stack support and MmGrowKernelStack when needed.
  * Write all the low-level code in assembly instead of relying on structures and hodgepodge code.
  * Add debugging/detection features for invalid calls, such as invalid IRQL, APCs being disabled, invalid previous mode detection (this allowed me to fix the KWAIT_BLOCK bug today).
  * Finally fix the last (I hope) remaning trap frame bug issue related to V86 mode bias. One of the "hacks" in syscall.S has already been removed and I can now do the promised cleanup.
  * Allow some failulre cases in callbacks (not all implemented) and extend stack space for future use of SEH in the ntdll dispatcher.
  * Fix win32k to use callbacks properly: the system fills out *Result and *ResultLength, not the caller.
  * Use SEH (ProbeForWrite) in callbacks to detect invalid user-mode memory.
  * Save NPX State and ExceptionList across callbacks (I think this wasn't fully properly done in all cases).




Updated files:
trunk/reactos/ntoskrnl/ke/i386/syscall.S
trunk/reactos/ntoskrnl/ke/i386/usercall_asm.S
trunk/reactos/ntoskrnl/ke/usercall.c
trunk/reactos/ntoskrnl/ke/wait.c
trunk/reactos/ntoskrnl/ps/psmgr.c
trunk/reactos/ntoskrnl/ps/win32.c
trunk/reactos/subsys/win32k/ntuser/callback.c




More information about the Ros-svn mailing list