From c812282081bbb08f2a2d5e3dedc532502de41cb9 Mon Sep 17 00:00:00 2001 From: Andres Lagar-Cavilla Date: Thu, 8 Mar 2012 09:05:22 +0000 Subject: Low mem virq incremental adjustments Consider tmem before firing the virq. Add .gitignore rune. Signed-off-by: Andres Lagar-Cavilla Acked-by: Dan Magenheimer Committed-by: Keir Fraser --- .gitignore | 1 + xen/common/page_alloc.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8810b35b54..87f483063b 100644 --- a/.gitignore +++ b/.gitignore @@ -203,6 +203,7 @@ tools/misc/xen-hvmctx tools/misc/gtraceview tools/misc/gtracestat tools/misc/xenlockprof +tools/misc/lowmemd tools/pygrub/build/* tools/python/build/* tools/python/xen/util/path.py diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 7cb16940c8..e3b84f9557 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -373,7 +373,10 @@ static void __init setup_low_mem_virq(void) static void check_low_mem_virq(void) { - if ( unlikely(total_avail_pages <= low_mem_virq_th) ) + unsigned long avail_pages = total_avail_pages + + opt_tmem ? tmem_freeable_pages() : 0; + + if ( unlikely(avail_pages <= low_mem_virq_th) ) { send_global_virq(VIRQ_ENOMEM); @@ -387,7 +390,7 @@ static void check_low_mem_virq(void) return; } - if ( unlikely(total_avail_pages >= low_mem_virq_high) ) + if ( unlikely(avail_pages >= low_mem_virq_high) ) { /* Reset hysteresis. Bring threshold up one order. * If we are back where originally set, set high -- cgit v1.2.3