Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174432
b: refs/heads/master
c: 3d65c94
h: refs/heads/master
v: v3
  • Loading branch information
Gianluca Guida authored and Jeremy Fitzhardinge committed Dec 4, 2009
1 parent a30ade1 commit 5092d80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4606f2165153833247823e8c04c5e88cb3d298b
refs/heads/master: 3d65c9488cadd2f11bd4d60c7266e639ece5d0d6
7 changes: 4 additions & 3 deletions trunk/drivers/xen/balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ static void balloon_append(struct page *page)
list_add(&page->lru, &ballooned_pages);
balloon_stats.balloon_low++;
}

totalram_pages--;
}

/* balloon_retrieve: rescue a page from the balloon, if it is not empty. */
Expand All @@ -156,6 +158,8 @@ static struct page *balloon_retrieve(void)
else
balloon_stats.balloon_low--;

totalram_pages++;

return page;
}

Expand Down Expand Up @@ -260,7 +264,6 @@ static int increase_reservation(unsigned long nr_pages)
}

balloon_stats.current_pages += nr_pages;
totalram_pages = balloon_stats.current_pages;

out:
spin_unlock_irqrestore(&balloon_lock, flags);
Expand Down Expand Up @@ -323,7 +326,6 @@ static int decrease_reservation(unsigned long nr_pages)
BUG_ON(ret != nr_pages);

balloon_stats.current_pages -= nr_pages;
totalram_pages = balloon_stats.current_pages;

spin_unlock_irqrestore(&balloon_lock, flags);

Expand Down Expand Up @@ -422,7 +424,6 @@ static int __init balloon_init(void)
pr_info("xen_balloon: Initialising balloon driver.\n");

balloon_stats.current_pages = min(xen_start_info->nr_pages, max_pfn);
totalram_pages = balloon_stats.current_pages;
balloon_stats.target_pages = balloon_stats.current_pages;
balloon_stats.balloon_low = 0;
balloon_stats.balloon_high = 0;
Expand Down

0 comments on commit 5092d80

Please sign in to comment.