summaryrefslogtreecommitdiffstats
path: root/src/kernel/pagemgr.C
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2011-12-13 14:46:48 -0600
committerDouglas R. Gilbert <dgilbert@us.ibm.com>2012-01-12 10:46:18 -0600
commit47f456fec103ec096edb5e0b9fcff54acbcd3d24 (patch)
tree478f16727ec00b72da727bdffa5d467d131b22be /src/kernel/pagemgr.C
parentb93f3dc742c0fa8d16f130938b56feb48e5bd7d7 (diff)
downloadtalos-hostboot-47f456fec103ec096edb5e0b9fcff54acbcd3d24.tar.gz
talos-hostboot-47f456fec103ec096edb5e0b9fcff54acbcd3d24.zip
Tool to display memory statistics
Change-Id: Iaac392b9f4287ba888e454532c4061d6a14c6e5c Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/593 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Diffstat (limited to 'src/kernel/pagemgr.C')
-rw-r--r--src/kernel/pagemgr.C7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kernel/pagemgr.C b/src/kernel/pagemgr.C
index ca5dca055..6b36a1054 100644
--- a/src/kernel/pagemgr.C
+++ b/src/kernel/pagemgr.C
@@ -28,6 +28,7 @@
#include <util/locked/pqueue.H>
size_t PageManager::cv_coalesce_count = 0;
+size_t PageManager::cv_low_page_count = -1;
void PageManager::init()
{
@@ -67,6 +68,7 @@ PageManager::PageManager() : iv_pagesAvail(0), iv_pagesTotal(0)
iv_pagesTotal = length;
// Update statistics.
__sync_add_and_fetch(&iv_pagesAvail, length);
+ cv_low_page_count = iv_pagesAvail;
// Display.
printk("Initializing PageManager with %zd pages starting at %lx...",
@@ -122,6 +124,10 @@ void* PageManager::_allocatePage(size_t n)
// Update statistics.
__sync_sub_and_fetch(&iv_pagesAvail, n);
+ if(iv_pagesAvail < cv_low_page_count)
+ {
+ cv_low_page_count = iv_pagesAvail;
+ }
return page;
}
@@ -237,6 +243,7 @@ void PageManager::_coalesce( void )
}
}
printkd("PAGEMGR coalesced total %ld\n", cv_coalesce_count);
+ printkd("PAGEMGR low page count %ld\n",cv_low_page_count);
}
OpenPOWER on IntegriCloud