summaryrefslogtreecommitdiffstats
path: root/src/include/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/include/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/include/kernel')
-rw-r--r--src/include/kernel/pagemgr.H8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/kernel/pagemgr.H b/src/include/kernel/pagemgr.H
index 7b5deddb4..d2500601f 100644
--- a/src/include/kernel/pagemgr.H
+++ b/src/include/kernel/pagemgr.H
@@ -188,14 +188,18 @@ class PageManager
enum
{
- KERNEL_HEAP_RESERVED_PAGES = 4,
+ // Always keep this many free pages for the kernel to use
+ KERNEL_HEAP_RESERVED_PAGES = 10,
+ // Triggers a NORMAL page castout
#ifdef CONFIG_P9_VPO_COMPILE // VPO has constrained mem env -> higher threshold
LOWMEM_NORM_LIMIT = 32,
#else
LOWMEM_NORM_LIMIT = 16,
#endif
- LOWMEM_CRIT_LIMIT = 5,
+
+ // Triggers CRITICAL page castout
+ LOWMEM_CRIT_LIMIT = KERNEL_HEAP_RESERVED_PAGES+1,
};
static size_t cv_coalesce_count; //!< running coalesced counter
OpenPOWER on IntegriCloud