lkml.org 
[lkml]   [2013]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] drivers: xen-selfballoon: consider slab pages
Date
Currently the goal_page in xen-selfballon doesn't consider much about pages used
in kernel space.
A typical usage is slab pages, without consider slab pages the goal_page result
may be too rough and lead extra memory pressure to guest os.

Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
drivers/xen/xen-selfballoon.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c
index 21e18c1..4814759 100644
--- a/drivers/xen/xen-selfballoon.c
+++ b/drivers/xen/xen-selfballoon.c
@@ -191,6 +191,8 @@ static void selfballoon_process(struct work_struct *work)
tgt_pages = cur_pages; /* default is no change */
goal_pages = vm_memory_committed() +
totalreserve_pages +
+ global_page_state(NR_SLAB_RECLAIMABLE) +
+ global_page_state(NR_SLAB_UNRECLAIMABLE) +
MB2PAGES(selfballoon_reserved_mb);
#ifdef CONFIG_FRONTSWAP
/* allow space for frontswap pages to be repatriated */
--
1.7.10.4


\
 
 \ /
  Last update: 2013-11-04 14:21    [W:0.064 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site