https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4a910a12cce2648652617…
commit 4a910a12cce264865261718ca8fe462cba45e4c0
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed Jan 24 10:09:19 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Wed Jan 24 10:09:19 2018 +0100
[NTOSKRNL] Make lazy writer thread run with higher priority.
CORE-14248
---
ntoskrnl/cc/view.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index 2bab26c446..5588a912db 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -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);