From f093b902e49a0ee46d232cd196ec48f88f801735 Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Mon, 8 Aug 2011 09:36:04 -0500 Subject: Adding a basic interface and implementation to the Segment/Block path to update the LRU statistics when the PageTableManager code clears the reference bit. This is not meant to be a complete implementation (different Task is open for that). This is Task 3400. Change-Id: If67efd16ead6f68a74f5f5a698013c1b852864d9 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/231 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell --- src/include/kernel/block.H | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/include/kernel/block.H') diff --git a/src/include/kernel/block.H b/src/include/kernel/block.H index 94daf0b3a..2421f97f9 100644 --- a/src/include/kernel/block.H +++ b/src/include/kernel/block.H @@ -30,6 +30,8 @@ #include #include #include +#include +#include class ShadowPTE; class Segment; @@ -140,6 +142,20 @@ class Block */ uint64_t findPhysicalAddress(uint64_t i_vaddr) const; + /** + * @brief Responsible for updating usage counts within the block [chain]. + * + * @param[in] i_vaddr - Abbreviated Virtual Address of page + * (bottom 23 bits are zero) + * @param[in] i_stats - Usage statistics + * + * If the address is not within this block or a matching page cannot be + * found, the block will attempt to make calls down the block-chain + * if it exists. + */ + void updateRefCount( uint64_t i_vaddr, + PageTableManager::UsageStats_t i_stats ); + friend class Segment; friend class BaseSegment; friend class StackSegment; -- cgit v1.2.3