kernel/vm: Track fault and copy counts in VMCache.
This solves a TODO for reporting CoW counts in area_info, and paves the way for adaptive handling of pre-faulting based on how many faults a cache has handled. Change-Id: I4ecd7cf46b794c51acac87184fef49ea5ce76743 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8873 Haiku-Format: Haiku-format Bot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
b2b3e71456
commit
17c3890ce1
@@ -174,6 +174,16 @@ public:
|
||||
virtual status_t Fault(struct VMAddressSpace *aspace,
|
||||
off_t offset);
|
||||
|
||||
inline uint64 FaultCount() const
|
||||
{ return fFaultCount; }
|
||||
inline void IncrementFaultCount()
|
||||
{ fFaultCount++; }
|
||||
|
||||
inline uint64 CopiedPagesCount() const
|
||||
{ return fCopiedPagesCount; }
|
||||
inline void IncrementCopiedPagesCount()
|
||||
{ fCopiedPagesCount++; }
|
||||
|
||||
virtual void Merge(VMCache* source);
|
||||
|
||||
virtual status_t AcquireUnreferencedStoreRef();
|
||||
@@ -228,7 +238,10 @@ private:
|
||||
PageEventWaiter* fPageEventWaiters;
|
||||
void* fUserData;
|
||||
VMCacheRef* fCacheRef;
|
||||
|
||||
page_num_t fWiredPagesCount;
|
||||
uint64 fFaultCount;
|
||||
uint64 fCopiedPagesCount;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user