https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c69ad5efa2d1962b6931599fb36060edd09a14e5
commit c69ad5efa2d1962b6931599fb36060edd09a14e5 Author: Thamatip Chitpong <thamatip.chitp...@reactos.org> AuthorDate: Tue Dec 24 20:02:23 2024 +0700 Commit: Thamatip Chitpong <thamatip.chitp...@reactos.org> CommitDate: Wed Jan 15 16:10:55 2025 +0700 [NTOS:MM] MmRequestPageMemoryConsumer: Properly mark CORE-17624 delay hack Addendum to commit 2b14056600bae80532f7ab9320fdc0853a55e30a. --- ntoskrnl/mm/balance.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/mm/balance.c b/ntoskrnl/mm/balance.c index bdb50c78707..eb5e6f1d05f 100644 --- a/ntoskrnl/mm/balance.c +++ b/ntoskrnl/mm/balance.c @@ -314,10 +314,12 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait, PPFN_NUMBER AllocatedPage) { PFN_NUMBER Page; + + /* Delay some requests for the Memory Manager to recover pages (CORE-17624). + * FIXME: This is suboptimal. + */ static INT i = 0; static LARGE_INTEGER TinyTime = {{-1L, -1L}}; - - /* Delay some requests for the Memory Manager to recover pages */ if (i++ >= 100) { KeDelayExecutionThread(KernelMode, FALSE, &TinyTime);