summaryrefslogtreecommitdiffstats
path: root/src/kernel
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2019-03-12 13:40:29 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-03-18 13:27:44 -0500
commite0f03516109881263fe86fc97d42d3ec6ae75155 (patch)
treecad65d1d2b35d21c0a4679b8372b6ea66e06f3f4 /src/kernel
parent853d251aef292f42cb8800ff58e0a4d48eeeb6bc (diff)
downloadtalos-hostboot-e0f03516109881263fe86fc97d42d3ec6ae75155.tar.gz
talos-hostboot-e0f03516109881263fe86fc97d42d3ec6ae75155.zip
Tweak page eviction parameters to handle low mem better
We are memory constrained in some configurations during 10.2 because we are forced to pin large chunks of memory to hold a few data partitions. In some instances we have run out of free memory completely. The fact that we don't hit this all the time indicates it is purely based on timing and the random nature of page allocations. A few changes were made to better handle these kinds of low memory situations: - Any time we dip into the kernel's private stash of free pages we will force memory periodics to run. This should free up some pages so that the kernel's stash can remain full. - The size of the kernel's private page stash is increased from 4 to 10. We need this larger number due to the increased layers involved in paging code in/out with secureboot enabled. - The LRU algorithm was modified to keep pages around longer. A page will not be evicted under normal circumstances until we go 10 refresh cycles without an access (up from 3). This should help balance out the increased number of forced periodics that could now come into play. Change-Id: I289d866270db9d70cac275d8c98ab185caaade05 CQ: SW458623 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/73189 Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/block.C4
-rw-r--r--src/kernel/pagemgr.C4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/kernel/block.C b/src/kernel/block.C
index b80db2aac..5b24ae1a6 100644
--- a/src/kernel/block.C
+++ b/src/kernel/block.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2018 */
+/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -387,7 +387,7 @@ void Block::castOutPages(uint64_t i_type)
(iv_baseAddr != VMM_ADDR_EXTEND_BLOCK)) // Skip extended memory.
{
size_t rw_constraint = 5;
- size_t ro_constraint = 3;
+ size_t ro_constraint = 10;
if(i_type == VmmManager::CRITICAL)
{
diff --git a/src/kernel/pagemgr.C b/src/kernel/pagemgr.C
index ee3a3ff39..3b5966421 100644
--- a/src/kernel/pagemgr.C
+++ b/src/kernel/pagemgr.C
@@ -318,6 +318,10 @@ void* PageManager::_allocatePage(size_t n, bool userspace)
{
printkd("PAGEMANAGER: kernel heap used\n");
page = iv_heapKernel.allocatePage(n);
+
+ // Any time we dip into the kernel heap we should start
+ // evicting user pages
+ CpuManager::forceMemoryPeriodic();
}
// If still not successful, we're out of memory. Assert.
OpenPOWER on IntegriCloud