summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/segmentmgr.H
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2011-08-08 09:36:04 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2011-09-06 12:18:36 -0500
commitf093b902e49a0ee46d232cd196ec48f88f801735 (patch)
treec6d540acf79d21e21c936a381968e4158fee29c7 /src/include/kernel/segmentmgr.H
parentdcf7c7f2c3be17df41e3cc483dbec6f085b05353 (diff)
downloadtalos-hostboot-f093b902e49a0ee46d232cd196ec48f88f801735.tar.gz
talos-hostboot-f093b902e49a0ee46d232cd196ec48f88f801735.zip
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 <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/kernel/segmentmgr.H')
-rw-r--r--src/include/kernel/segmentmgr.H13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/kernel/segmentmgr.H b/src/include/kernel/segmentmgr.H
index 0d8caec33..563497047 100644
--- a/src/include/kernel/segmentmgr.H
+++ b/src/include/kernel/segmentmgr.H
@@ -29,6 +29,7 @@
#include <kernel/task.H>
#include <builtins.h>
+#include <kernel/ptmgr.H>
// Forward declaration.
class Segment;
@@ -107,6 +108,15 @@ class SegmentManager
*/
static uint64_t findPhysicalAddress(uint64_t i_vaddr);
+ /**
+ * @brief Update LRU statistics on the block that owns the page
+ *
+ * @param[in] i_vaddr - Virtual Address of page
+ * @param[in] i_stats - Usage statistics
+ */
+ static void updateRefCount( uint64_t i_vaddr,
+ PageTableManager::UsageStats_t i_stats );
+
private:
/** See handlePageFault. */
@@ -115,6 +125,9 @@ class SegmentManager
void _addSegment(Segment* i_segment, size_t i_segId);
/** See initSLB. */
void _initSLB();
+ /** See updateRefCount. */
+ void _updateRefCount( uint64_t i_vaddr,
+ PageTableManager::UsageStats_t i_stats );
/** See findPhysicalAddress */
uint64_t _findPhysicalAddress(uint64_t i_vaddr) const;
OpenPOWER on IntegriCloud