From: Andres Lagar-Cavilla <andres@lagarcavilla.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
Subject: [PATCH] Low mem virq incremental adjustments
Date: Wed, 07 Mar 2012 11:15:08 -0500 [thread overview]
Message-ID: <5651945c7a74652efce9.1331136908@xdev.gridcentric.ca> (raw)
.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
next reply other threads:[~2012-03-07 16:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 16:15 Andres Lagar-Cavilla [this message]
2012-03-07 17:02 ` [PATCH] Low mem virq incremental adjustments 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5651945c7a74652efce9.1331136908@xdev.gridcentric.ca \
--to=andres@lagarcavilla.org \
--cc=JBeulich@suse.com \
--cc=adin@gridcentric.ca \
--cc=andres@gridcentric.ca \
--cc=dan.magenheimer@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).