[NTOSKRNL] Make lazy writer thread run with higher priority.
authorPierre Schweitzer <pierre@reactos.org>
Wed, 24 Jan 2018 09:09:19 +0000 (10:09 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Wed, 24 Jan 2018 09:09:19 +0000 (10:09 +0100)
CORE-14248

ntoskrnl/cc/view.c

index 2bab26c..5588a91 100644 (file)
@@ -1387,6 +1387,7 @@ CcInitView (
 {
     HANDLE LazyWriter;
     NTSTATUS Status;
+    KPRIORITY Priority;
     OBJECT_ATTRIBUTES ObjectAttributes;
 
     DPRINT("CcInitView()\n");
@@ -1458,6 +1459,13 @@ CcInitView (
         return FALSE;
     }
 
+    Priority = 27;
+    Status = NtSetInformationThread(LazyWriter,
+                                   ThreadPriority,
+                                   &Priority,
+                                   sizeof(Priority));
+    ASSERT(NT_SUCCESS(Status));
+
     /* Handle is not needed */
     ObCloseHandle(LazyWriter, KernelMode);