[ros-dev] [ros-diffs] [dchapyshev] 41389: - Start services.exe and lsass.exe with above normal priority class

Ged gedmurphy at gmail.com
Fri Jun 12 20:00:15 CEST 2009


Ok, I've just read the actual code for NtSetInformationProcess (probably should have done that first)
It's right, what threw me was your r41390 commit which contained this :

+    PriorityClass.PriorityClass = PROCESS_PRIORITY_CLASS_HIGH;
+    PriorityClass.Foreground = FALSE;
+
+    /* Set priority for process */
+    if (!NT_SUCCESS(NtSetInformationProcess(ProcessInfo.ProcessHandle,
+                                            ProcessPriorityClass,
+                                            &PriorityClass,
+                                            sizeof(PROCESS_PRIORITY_CLASS))))
+    {
+        DPRINT1("Unable to set process priority for winlogon.exe\n");
+    }

I assumed from reading this that our NtSetInformationProcess was setting process priorities via #defines.
It turns out that the above is actually wrong. From pstypes.h :

#define PROCESS_PRIORITY_CLASS_HIGH 3

You were setting winlogon to have a priority of 3. Clearly not right ... heh.

Anyway, I see you've reverted it now. Problem solved.
I was just writing this follow up so you didn't start looking into NtSetInformationProcess and scratching your head wondering what my previous mail was about

Ged.




-----Original Message-----
From: Ged [mailto:gedmurphy at gmail.com] 
Sent: 12 June 2009 18:48
To: 'ros-dev at reactos.org'
Subject: RE: [ros-diffs] [dchapyshev] 41389: - Start services.exe and lsass.exe with above normal priority class

Hi

This change is wrong. ABOVE_NORMAL_PRIORITY_CLASS sets them to a process level of 10 which is too high.

Windows actually runs these at a level of 9 to ensure they get proc time before the regular NORMAL_PRIORITY_CLASS(8) processes but below the ABOVE_NORMAL_PRIORITY_CLASS(10) processes.

IIRC, you should be able to set the process directly using NtSetInformationProcess although our implementation doesn't  seem to reflect this.
Is it our implementation or my memory which is wrong ?

Ged.


-----Original Message-----
From: ros-diffs-bounces at reactos.org [mailto:ros-diffs-bounces at reactos.org] On Behalf Of dchapyshev at svn.reactos.org
Sent: 12 June 2009 16:41
To: ros-diffs at reactos.org
Subject: [ros-diffs] [dchapyshev] 41389: - Start services.exe and lsass.exe with above normal priority class

Author: dchapyshev
Date: Fri Jun 12 19:41:26 2009
New Revision: 41389

URL: http://svn.reactos.org/svn/reactos?rev=41389&view=rev
Log:
- Start services.exe and lsass.exe with above normal priority class

Modified:
    trunk/reactos/base/system/winlogon/winlogon.c

Modified: trunk/reactos/base/system/winlogon/winlogon.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/winlogon/winlogon.c?rev=41389&r1=41388&r2=41389&view=diff
==============================================================================
--- trunk/reactos/base/system/winlogon/winlogon.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/winlogon/winlogon.c [iso-8859-1] Fri Jun 12 19:41:26 2009
@@ -49,7 +49,7 @@
 		NULL,
 		NULL,
 		FALSE,
-		DETACHED_PROCESS,
+		DETACHED_PROCESS | ABOVE_NORMAL_PRIORITY_CLASS,
 		NULL,
 		NULL,
 		&StartupInfo,
@@ -97,7 +97,7 @@
 		NULL,
 		NULL,
 		FALSE,
-		DETACHED_PROCESS,
+		DETACHED_PROCESS | ABOVE_NORMAL_PRIORITY_CLASS,
 		NULL,
 		NULL,
 		&StartupInfo,




More information about the Ros-dev mailing list