mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
[NTOSKRNL] Store the total dirty pages per shared cache map in it.
This commit is contained in:
parent
2362e0faae
commit
5cc0668b21
3 changed files with 9 additions and 1 deletions
|
@ -235,6 +235,7 @@ CcPurgeCacheSection (
|
|||
{
|
||||
RemoveEntryList(&Vacb->DirtyVacbListEntry);
|
||||
CcTotalDirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
Vacb->SharedCacheMap->DirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
}
|
||||
RemoveEntryList(&Vacb->CacheMapVacbListEntry);
|
||||
InsertHeadList(&FreeList, &Vacb->CacheMapVacbListEntry);
|
||||
|
|
|
@ -175,6 +175,7 @@ CcRosFlushVacb (
|
|||
Vacb->Dirty = FALSE;
|
||||
RemoveEntryList(&Vacb->DirtyVacbListEntry);
|
||||
CcTotalDirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
Vacb->SharedCacheMap->DirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
CcRosVacbDecRefCount(Vacb);
|
||||
|
||||
KeReleaseSpinLock(&Vacb->SharedCacheMap->CacheMapLock, oldIrql);
|
||||
|
@ -535,6 +536,7 @@ CcRosReleaseVacb (
|
|||
{
|
||||
InsertTailList(&DirtyVacbListHead, &Vacb->DirtyVacbListEntry);
|
||||
CcTotalDirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
Vacb->SharedCacheMap->DirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
}
|
||||
|
||||
if (Mapped)
|
||||
|
@ -621,6 +623,7 @@ CcRosMarkDirtyVacb (
|
|||
{
|
||||
InsertTailList(&DirtyVacbListHead, &Vacb->DirtyVacbListEntry);
|
||||
CcTotalDirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
Vacb->SharedCacheMap->DirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -698,6 +701,7 @@ CcRosUnmapVacb (
|
|||
{
|
||||
InsertTailList(&DirtyVacbListHead, &Vacb->DirtyVacbListEntry);
|
||||
CcTotalDirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
Vacb->SharedCacheMap->DirtyPages += VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
}
|
||||
|
||||
CcRosVacbDecRefCount(Vacb);
|
||||
|
@ -1162,6 +1166,7 @@ CcRosDeleteFileCache (
|
|||
{
|
||||
RemoveEntryList(¤t->DirtyVacbListEntry);
|
||||
CcTotalDirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
current->SharedCacheMap->DirtyPages -= VACB_MAPPING_GRANULARITY / PAGE_SIZE;
|
||||
DPRINT1("Freeing dirty VACB\n");
|
||||
}
|
||||
InsertHeadList(&FreeList, ¤t->CacheMapVacbListEntry);
|
||||
|
@ -1349,6 +1354,7 @@ CcRosInitializeFileCache (
|
|||
SharedCacheMap->FileSize = FileSizes->FileSize;
|
||||
SharedCacheMap->PinAccess = PinAccess;
|
||||
SharedCacheMap->DirtyPageThreshold = 0;
|
||||
SharedCacheMap->DirtyPages = 0;
|
||||
KeInitializeSpinLock(&SharedCacheMap->CacheMapLock);
|
||||
InitializeListHead(&SharedCacheMap->CacheMapVacbListHead);
|
||||
FileObject->SectionObjectPointer->SharedCacheMap = SharedCacheMap;
|
||||
|
|
|
@ -159,8 +159,9 @@ typedef struct _ROS_SHARED_CACHE_MAP
|
|||
PVOID LazyWriteContext;
|
||||
KSPIN_LOCK CacheMapLock;
|
||||
ULONG OpenCount;
|
||||
ULONG DirtyPageThreshold;
|
||||
ULONG DirtyPages;
|
||||
LIST_ENTRY SharedCacheMapLinks;
|
||||
ULONG DirtyPageThreshold;
|
||||
#if DBG
|
||||
BOOLEAN Trace; /* enable extra trace output for this cache map and it's VACBs */
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue