mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[NTOSKRNL] Modified CcCanIWrite to handle Mm throttling limits
This commit is contained in:
parent
6b0cb54fe5
commit
5d93941d31
1 changed files with 7 additions and 1 deletions
|
@ -697,10 +697,16 @@ CcCanIWrite (
|
|||
/* So, now allow write if:
|
||||
* - Not the first try or we have no throttling yet
|
||||
* AND:
|
||||
* - We don't execeed threshold!
|
||||
* - We don't exceed threshold!
|
||||
* - We don't exceed what Mm can allow us to use
|
||||
* + If we're above top, that's fine
|
||||
* + If we're above bottom with limited modified pages, that's fine
|
||||
* + Otherwise, throttle!
|
||||
*/
|
||||
if ((TryContext != FirstTry || IsListEmpty(&CcDeferredWrites)) &&
|
||||
CcTotalDirtyPages + Pages < CcDirtyPageThreshold &&
|
||||
(MmAvailablePages > MmThrottleTop ||
|
||||
(MmModifiedPageListHead.Total < 1000 && MmAvailablePages > MmThrottleBottom)) &&
|
||||
!PerFileDefer)
|
||||
{
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue