[NTOS:CC] Be verbose about why we defer writes

This commit is contained in:
Jérôme Gardou 2021-02-16 11:26:25 +01:00
parent 00ce9ad42a
commit edd4a985d9

View file

@ -418,7 +418,18 @@ CcCanIWrite (
&CcDeferredWriteSpinLock); &CcDeferredWriteSpinLock);
} }
#if DBG
DPRINT1("Actively deferring write for: %p\n", FileObject); DPRINT1("Actively deferring write for: %p\n", FileObject);
DPRINT1("Because:\n");
if (CcTotalDirtyPages + Pages >= CcDirtyPageThreshold)
DPRINT1(" There are too many cache dirty pages: %x + %x >= %x\n", CcTotalDirtyPages, Pages, CcDirtyPageThreshold);
if (MmAvailablePages <= MmThrottleTop)
DPRINT1(" Available pages are below throttle top: %lx <= %lx\n", MmAvailablePages, MmThrottleTop);
if (MmModifiedPageListHead.Total >= 1000)
DPRINT1(" There are too many modified pages: %lu >= 1000\n", MmModifiedPageListHead.Total);
if (MmAvailablePages <= MmThrottleBottom)
DPRINT1(" Available pages are below throttle bottom: %lx <= %lx\n", MmAvailablePages, MmThrottleBottom);
#endif
/* Now, we'll loop until our event is set. When it is set, it means that caller /* Now, we'll loop until our event is set. When it is set, it means that caller
* can immediately write, and has to * can immediately write, and has to
*/ */