From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andres Lagar-Cavilla Subject: [PATCH] Low mem virq incremental adjustments Date: Wed, 07 Mar 2012 11:15:08 -0500 Message-ID: <5651945c7a74652efce9.1331136908@xdev.gridcentric.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: dan.magenheimer@oracle.com, ian.campbell@citrix.com, andres@gridcentric.ca, tim@xen.org, JBeulich@suse.com, ian.jackson@citrix.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org .gitignore | 1 + xen/common/page_alloc.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) Consider tmem before firing the virq. Add .gitignore rune. Signed-off-by: Andres Lagar-Cavilla Acked-by: Dan Magenheimer diff -r f7ce6d26635c -r 5651945c7a74 .gitignore --- a/.gitignore +++ b/.gitignore @@ -197,6 +197,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 -r f7ce6d26635c -r 5651945c7a74 xen/common/page_alloc.c --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -377,7 +377,10 @@ static void __init setup_low_mem_virq(vo 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); @@ -391,7 +394,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