From 594d924eaae1dfe12c0c4d51922858b0371c93ba Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Fri, 26 Jan 2007 20:54:30 +0000 Subject: [PATCH] - Enable NT Scheduler. - The good: - Fixes hangs/freezes in trunk - No matter how sluggish the system got, I was able to move the mouse and other apps were still responsive even though one app was hogging the CPU. - Balancer thread activates and does its job of preventing deadlocks. - The code was heavily tested and some of it is based off direct pseudo-code from NT's very own kernel (legally obtained from Windows Internals II slides) as well as Windows Internals 4th. The bad: - Explorer takes 30 seconds to load, after that all is fine though. - First-stage installer asserts at 18% in Mm instead of lagging like previously. - Various other Mm crashes related to the above ^^. - Please help out to fix/figure out the Mm crashes! It would be much appreciated, otherwise, in a week, we will revert this patch as well as the patch that caused the hangs/freezes. svn path=/trunk/; revision=25639 --- reactos/include/ndk/asm.h | 2 +- reactos/ntoskrnl/ke/balmgr.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/include/ndk/asm.h b/reactos/include/ndk/asm.h index 25a767f5877..88cebfcac65 100644 --- a/reactos/include/ndk/asm.h +++ b/reactos/include/ndk/asm.h @@ -20,7 +20,7 @@ Author: #ifndef _ASM_H #define _ASM_H -//#define NEW_SCHEDULER +#define NEW_SCHEDULER // // PCR Access diff --git a/reactos/ntoskrnl/ke/balmgr.c b/reactos/ntoskrnl/ke/balmgr.c index 74f09d984cd..79b2a7e643f 100644 --- a/reactos/ntoskrnl/ke/balmgr.c +++ b/reactos/ntoskrnl/ke/balmgr.c @@ -114,7 +114,9 @@ KiScanReadyQueues(IN PKDPC Dpc, } /* Release the locks and dispatcher */ +#ifndef NEW_SCHEDULER OldSched: +#endif KiReleasePrcbLock(Prcb); KiReleaseDispatcherLock(OldIrql);