mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[NTOSKRNL] Bug fix: lazy write more often.
CcDirtyPageThreshold is not here to compute when you have to write, but to know where you have to deny writes. More commits to come in that direction! CORE-14235
This commit is contained in:
parent
5ec441a867
commit
6ba67b8152
1 changed files with 10 additions and 15 deletions
|
@ -326,23 +326,18 @@ CciLazyWriter(PVOID Unused)
|
|||
/* We're not sleeping anymore */
|
||||
KeClearEvent(&iLazyWriterNotify);
|
||||
|
||||
/* Only start operations if above threshold */
|
||||
DPRINT("TS: %lu, Count: %lu\n", CcDirtyPageThreshold, CcTotalDirtyPages);
|
||||
if (CcTotalDirtyPages > CcDirtyPageThreshold)
|
||||
/* Our target is one-eighth of the dirty pages */
|
||||
Target = CcTotalDirtyPages / 8;
|
||||
if (Target != 0)
|
||||
{
|
||||
/* Our target is one-eighth of the dirty pages */
|
||||
Target = CcTotalDirtyPages / 8;
|
||||
if (Target != 0)
|
||||
{
|
||||
/* Flush! */
|
||||
DPRINT("Lazy writer starting (%d)\n", Target);
|
||||
CcRosFlushDirtyPages(Target, &Count, FALSE, TRUE);
|
||||
/* Flush! */
|
||||
DPRINT("Lazy writer starting (%d)\n", Target);
|
||||
CcRosFlushDirtyPages(Target, &Count, FALSE, TRUE);
|
||||
|
||||
/* And update stats */
|
||||
CcLazyWritePages += Count;
|
||||
++CcLazyWriteIos;
|
||||
DPRINT("Lazy writer done (%d)\n", Count);
|
||||
}
|
||||
/* And update stats */
|
||||
CcLazyWritePages += Count;
|
||||
++CcLazyWriteIos;
|
||||
DPRINT("Lazy writer done (%d)\n", Count);
|
||||
}
|
||||
|
||||
/* Inform people waiting on us that we're done */
|
||||
|
|
Loading…
Reference in a new issue