All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: xen-selfballoon: consider slab pages
@ 2013-11-04 12:39 Bob Liu
  2013-11-04 15:13 ` Konrad Rzeszutek Wilk
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Bob Liu @ 2013-11-04 12:39 UTC (permalink / raw)
  To: konrad.wilk; +Cc: xen-devel, linux-kernel, Bob Liu

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-05 10:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-04 12:39 [PATCH] drivers: xen-selfballoon: consider slab pages Bob Liu
2013-11-04 15:13 ` Konrad Rzeszutek Wilk
2013-11-04 15:13 ` Konrad Rzeszutek Wilk
2013-11-04 17:22 ` [Xen-devel] " David Vrabel
2013-11-05  3:30   ` Bob Liu
2013-11-05 10:33     ` David Vrabel
2013-11-05 10:33     ` [Xen-devel] " David Vrabel
2013-11-05  3:30   ` Bob Liu
2013-11-04 17:22 ` David Vrabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.