xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Low mem virq incremental adjustments
@ 2012-03-07 16:15 Andres Lagar-Cavilla
  2012-03-07 17:02 ` Jan Beulich
  0 siblings, 1 reply; 6+ messages in thread
From: Andres Lagar-Cavilla @ 2012-03-07 16:15 UTC (permalink / raw)
  To: xen-devel
  Cc: dan.magenheimer, ian.campbell, andres, tim, JBeulich, ian.jackson,
	adin

 .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 <andres@lagarcavilla.org>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>

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

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

end of thread, other threads:[~2012-03-09  9:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 16:15 [PATCH] Low mem virq incremental adjustments Andres Lagar-Cavilla
2012-03-07 17:02 ` Jan Beulich
2012-03-07 18:12   ` Andres Lagar-Cavilla
2012-03-08 21:59     ` Dan Magenheimer
2012-03-09  9:04       ` Jan Beulich
2012-03-09  9:56         ` Keir Fraser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).