https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2d4a54dcf26c0a3df89d2…
commit 2d4a54dcf26c0a3df89d21c3247fc638413fa4dc
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Jan 27 21:51:33 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Jan 27 21:52:19 2018 +0100
[NTOSKRNL] Hello CcIdleDelay :-)
(Good link for the interested reader:
https://msdn.microsoft.com/en-us/library/bb742613.aspx)
---
ntoskrnl/cc/view.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index 1268fb5203..7112e02373 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -64,12 +64,14 @@ ULONG CcLazyWriteIos = 0;
* - List for deferred writes
* - Spinlock when dealing with the deferred list
* - List for "clean" shared cache maps
+ * - One second delay for lazy writer
*/
ULONG CcDirtyPageThreshold = 0;
ULONG CcTotalDirtyPages = 0;
LIST_ENTRY CcDeferredWrites;
KSPIN_LOCK CcDeferredWriteSpinLock;
LIST_ENTRY CcCleanSharedCacheMapList;
+LARGE_INTEGER CcIdleDelay = {.QuadPart = (LONGLONG)-1*1000*1000*10};
/* Internal vars (ROS):
* - Event to notify lazy writer to shutdown
@@ -312,10 +314,6 @@ VOID
NTAPI
CciLazyWriter(PVOID Unused)
{
- LARGE_INTEGER OneSecond;
-
- OneSecond.QuadPart = (LONGLONG)-1*1000*1000*10;
-
while (TRUE)
{
NTSTATUS Status;
@@ -327,7 +325,7 @@ CciLazyWriter(PVOID Unused)
Executive,
KernelMode,
FALSE,
- &OneSecond);
+ &CcIdleDelay);
/* If we succeeed, we've to stop running! */
if (Status == STATUS_SUCCESS)