From 11683762c3992de23adc1d8c4dff11ec75e47b2f Mon Sep 17 00:00:00 2001 From: Dibyamartanda Samanta Date: Sun, 18 Aug 2024 07:28:25 +0200 Subject: [PATCH] [NTOSKRNL:CC] Calculate Dirty Pages like NT5 --- NTOSKRNL/CC/cclazywriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NTOSKRNL/CC/cclazywriter.cpp b/NTOSKRNL/CC/cclazywriter.cpp index 126b549..1934704 100644 --- a/NTOSKRNL/CC/cclazywriter.cpp +++ b/NTOSKRNL/CC/cclazywriter.cpp @@ -1373,8 +1373,8 @@ CcAdjustWriteBehindThreadPoolIfNeeded( } } else - { - if (CcGlobalDirtyPageStatistics.DirtyPages > 0x2000 || NeedAdjustment) + { auto DirtyPages = (CcTotalDirtyPages + CcPagesWrittenLastTime); + if (DirtyPages > 0x2000 || NeedAdjustment) { if (CcIsWriteBehindThreadpoolAtLowPriority()) {