]> xenbits.xensource.com Git - xen.git/commitdiff
Low mem virq incremental adjustments
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 8 Mar 2012 09:05:22 +0000 (09:05 +0000)
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 8 Mar 2012 09:05:22 +0000 (09:05 +0000)
Consider tmem before firing the virq.

Add .gitignore rune.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Committed-by: Keir Fraser <keir@xen.org>
.gitignore
xen/common/page_alloc.c

index 8810b35b54cb7ae7da319fcc8f64816efd18aff6..87f483063bd1be274af431dd351e743b9ad2af32 100644 (file)
@@ -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
index 7cb16940c8db8d9b929b41eec2e5eb53612ecccc..e3b84f95573c772fd003d8aaf7171e5fbbab3eae 100644 (file)
@@ -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