aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/memory.c
diff options
context:
space:
mode:
authorDan Magenheimer <dan.magenheimer@oracle.com>2012-12-10 11:15:53 +0000
committerDan Magenheimer <dan.magenheimer@oracle.com>2012-12-10 11:15:53 +0000
commit1c3b9dd61dabb6415fad0c0ae432a4a78bfca7f5 (patch)
treeee94213bc075524ee82cb8873c88d8bca0716977 /xen/common/memory.c
parente93e0d9d73ce77bd1f3471af68a194b47e0e8c45 (diff)
downloadxen-1c3b9dd61dabb6415fad0c0ae432a4a78bfca7f5.tar.gz
xen-1c3b9dd61dabb6415fad0c0ae432a4a78bfca7f5.tar.bz2
xen-1c3b9dd61dabb6415fad0c0ae432a4a78bfca7f5.zip
xen: centralize accounting for domain tot_pages
Provide and use a common function for all adjustments to a domain's tot_pages counter in anticipation of future and/or out-of-tree patches that must adjust related counters atomically. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/memory.c')
-rw-r--r--xen/common/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/common/memory.c b/xen/common/memory.c
index c8541c4f9e..c8c1ef2896 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -465,7 +465,7 @@ static long memory_exchange(XEN_GUEST_HANDLE_PARAM(xen_memory_exchange_t) arg)
(j * (1UL << exch.out.extent_order)));
spin_lock(&d->page_alloc_lock);
- d->tot_pages -= dec_count;
+ domain_adjust_tot_pages(d, -dec_count);
drop_dom_ref = (dec_count && !d->tot_pages);
spin_unlock(&d->page_alloc_lock);