https://git.reactos.org/?p=reactos.git;a=commitdiff;h=edd4a985d986158e8d02c42a4bd340f4b30686ed
commit edd4a985d986158e8d02c42a4bd340f4b30686ed Author: Jérôme Gardou <jerome.gar...@reactos.org> AuthorDate: Tue Feb 16 11:26:25 2021 +0100 Commit: Jérôme Gardou <jerome.gar...@reactos.org> CommitDate: Wed Mar 24 15:27:36 2021 +0100 [NTOS:CC] Be verbose about why we defer writes --- ntoskrnl/cc/copy.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c index 3ab5b7852f3..30864bc319e 100644 --- a/ntoskrnl/cc/copy.c +++ b/ntoskrnl/cc/copy.c @@ -418,7 +418,18 @@ CcCanIWrite ( &CcDeferredWriteSpinLock); } +#if DBG 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 * can immediately write, and has to */