Author: cgutman
Date: Tue Nov 29 03:24:03 2011
New Revision: 54530
URL:
http://svn.reactos.org/svn/reactos?rev=54530&view=rev
Log:
[NTOSKRNL]
- Remove a superfluous user LRU insertion and removal
- Add a missing user LRU insertion
Modified:
trunk/reactos/ntoskrnl/mm/balance.c
Modified: trunk/reactos/ntoskrnl/mm/balance.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/balance.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/balance.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/balance.c [iso-8859-1] Tue Nov 29 03:24:03 2011
@@ -122,7 +122,6 @@
Entry = RemoveHeadList(&AllocationListHead);
Request = CONTAINING_RECORD(Entry, MM_ALLOCATION_REQUEST, ListEntry);
KeReleaseSpinLock(&AllocationListLock, OldIrql);
- if(Consumer == MC_USER) MmRemoveLRUUserPage(Page);
MiZeroPhysicalPage(Page);
Request->Page = Page;
KeSetEvent(&Request->Event, IO_NO_INCREMENT, FALSE);
@@ -256,6 +255,7 @@
{
KeBugCheck(NO_PAGES_AVAILABLE);
}
+ if (Consumer == MC_USER) MmInsertLRULastUserPage(Page);
*AllocatedPage = Page;
if (MmAvailablePages <= MiMinimumAvailablePages &&
MiBalancerThreadHandle != NULL)
@@ -304,10 +304,10 @@
{
KeBugCheck(NO_PAGES_AVAILABLE);
}
- /* Update the Consumer and make the page active */
- if(Consumer == MC_USER) MmInsertLRULastUserPage(Page);
+
*AllocatedPage = Page;
(void)InterlockedDecrementUL(&MiPagesRequired);
+
return(STATUS_SUCCESS);
}