Displaying 1 result from an estimated 1 matches for "dom_before".
Did you mean:
do_before
2012 Nov 15
1
[RFC/PATCH v4] XENMEM_claim_pages (subop of existing) hypercall
...,6 +238,111 @@ static long midsize_alloc_zone_pages;
#define MIDSIZE_ALLOC_FRAC 128
static DEFINE_SPINLOCK(heap_lock);
+static long total_unclaimed_pages; /* total outstanding claims by all domains */
+
+unsigned long domain_increase_tot_pages(struct domain *d, unsigned long pages)
+{
+ long dom_before, dom_after, dom_claimed, sys_before, sys_after;
+
+ ASSERT(spin_is_locked(&d->page_alloc_lock));
+ if ( !d->unclaimed_pages )
+ return d->tot_pages += pages;
+ spin_lock(&heap_lock);
+ dom_before = d->unclaimed_pages;
+ dom_after = dom_before - pages;
+...