Displaying 13 results from an estimated 13 matches for "balloon_retrieve".
2011 Sep 08
1
[PATCH v4 1/2] xen: add an "highmem" parameter to alloc_xenballooned_pages
...eturn 0 on success, error otherwise
*/
-int alloc_xenballooned_pages(int nr_pages, struct page** pages)
+int alloc_xenballooned_pages(int nr_pages, struct page** pages, bool highmem)
{
int pgno = 0;
struct page* page;
mutex_lock(&balloon_mutex);
while (pgno < nr_pages) {
- page = balloon_retrieve(true);
- if (page) {
+ page = balloon_retrieve(highmem);
+ if (page && PageHighMem(page) == highmem) {
pages[pgno++] = page;
} else {
enum bp_state st;
- st = decrease_reservation(nr_pages - pgno, GFP_HIGHUSER);
+ if (page)
+ balloon_append(page);
+ st = decrease_rese...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
...static LIST_HEAD(ballooned_pages);
@@ -132,9 +124,7 @@ static void __balloon_append(struct page *page)
static void balloon_append(struct page *page)
{
__balloon_append(page);
- if (PageHighMem(page))
- dec_totalhigh_pages();
- totalram_pages--;
+ adjust_managed_page_count(page, -1);
}
/* balloon_retrieve: rescue a page from the balloon, if it is not empty. */
@@ -151,13 +141,12 @@ static struct page *balloon_retrieve(bool prefer_highmem)
page = list_entry(ballooned_pages.next, struct page, lru);
list_del(&page->lru);
- if (PageHighMem(page)) {
+ if (PageHighMem(page))
balloon_stats...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
...static LIST_HEAD(ballooned_pages);
@@ -132,9 +124,7 @@ static void __balloon_append(struct page *page)
static void balloon_append(struct page *page)
{
__balloon_append(page);
- if (PageHighMem(page))
- dec_totalhigh_pages();
- totalram_pages--;
+ adjust_managed_page_count(page, -1);
}
/* balloon_retrieve: rescue a page from the balloon, if it is not empty. */
@@ -151,13 +141,12 @@ static struct page *balloon_retrieve(bool prefer_highmem)
page = list_entry(ballooned_pages.next, struct page, lru);
list_del(&page->lru);
- if (PageHighMem(page)) {
+ if (PageHighMem(page))
balloon_stats...
2013 May 26
6
[PATCH v8, part3 12/14] mm: correctly update zone->mamaged_pages
...static LIST_HEAD(ballooned_pages);
@@ -132,9 +124,7 @@ static void __balloon_append(struct page *page)
static void balloon_append(struct page *page)
{
__balloon_append(page);
- if (PageHighMem(page))
- dec_totalhigh_pages();
- totalram_pages--;
+ adjust_managed_page_count(page, -1);
}
/* balloon_retrieve: rescue a page from the balloon, if it is not empty. */
@@ -151,13 +141,12 @@ static struct page *balloon_retrieve(bool prefer_highmem)
page = list_entry(ballooned_pages.next, struct page, lru);
list_del(&page->lru);
- if (PageHighMem(page)) {
+ if (PageHighMem(page))
balloon_stats...
2013 May 11
0
[PATCH v6, part3 13/16] mm: correctly update zone->mamaged_pages
...static LIST_HEAD(ballooned_pages);
@@ -132,9 +124,7 @@ static void __balloon_append(struct page *page)
static void balloon_append(struct page *page)
{
__balloon_append(page);
- if (PageHighMem(page))
- dec_totalhigh_pages();
- totalram_pages--;
+ adjust_managed_page_count(page, -1);
}
/* balloon_retrieve: rescue a page from the balloon, if it is not empty. */
@@ -151,13 +141,12 @@ static struct page *balloon_retrieve(bool prefer_highmem)
page = list_entry(ballooned_pages.next, struct page, lru);
list_del(&page->lru);
- if (PageHighMem(page)) {
+ if (PageHighMem(page))
balloon_stats...
2013 May 11
0
[PATCH v6, part3 13/16] mm: correctly update zone->mamaged_pages
...static LIST_HEAD(ballooned_pages);
@@ -132,9 +124,7 @@ static void __balloon_append(struct page *page)
static void balloon_append(struct page *page)
{
__balloon_append(page);
- if (PageHighMem(page))
- dec_totalhigh_pages();
- totalram_pages--;
+ adjust_managed_page_count(page, -1);
}
/* balloon_retrieve: rescue a page from the balloon, if it is not empty. */
@@ -151,13 +141,12 @@ static struct page *balloon_retrieve(bool prefer_highmem)
page = list_entry(ballooned_pages.next, struct page, lru);
list_del(&page->lru);
- if (PageHighMem(page)) {
+ if (PageHighMem(page))
balloon_stats...
2013 May 11
0
[PATCH v6, part3 13/16] mm: correctly update zone->mamaged_pages
...static LIST_HEAD(ballooned_pages);
@@ -132,9 +124,7 @@ static void __balloon_append(struct page *page)
static void balloon_append(struct page *page)
{
__balloon_append(page);
- if (PageHighMem(page))
- dec_totalhigh_pages();
- totalram_pages--;
+ adjust_managed_page_count(page, -1);
}
/* balloon_retrieve: rescue a page from the balloon, if it is not empty. */
@@ -151,13 +141,12 @@ static struct page *balloon_retrieve(bool prefer_highmem)
page = list_entry(ballooned_pages.next, struct page, lru);
list_del(&page->lru);
- if (PageHighMem(page)) {
+ if (PageHighMem(page))
balloon_stats...
2005 Dec 07
5
[PATCH] Arch-neutral balloon driver
...mer <dan.magenheimer@hp.com>
diff -r 0255f48b757f linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Sun Dec
4 19:12:00 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Tue Dec
6 16:25:53 2005
@@ -192,8 +192,8 @@
page = balloon_retrieve();
BUG_ON(page == NULL);
- pfn = page - mem_map;
- BUG_ON(phys_to_machine_mapping[pfn] !=
INVALID_P2M_ENTRY);
+ pfn = page_to_pfn(page);
+ BUG_ON(phys_to_machine_mapping_valid(pfn));
/* Update P->M and M->P tables. */
set_phys_to_machine(pfn, mfn_list[i]);
@@ -253,8 +253,8 @@...
2007 Apr 28
4
confused about the balloon code
hi
I try to understand the code of balloon ,and got confused about the
following parts of code:
static int decrease_reservation(unsigned long nr_pages)
{
....
if (!PageHighMem(page)) {
v = phys_to_virt(pfn << PAGE_SHIFT);
scrub_pages(v, 1);
ret = HYPERVISOR_update_va_mapping(
(unsigned long)v, __pte_ma(0), 0);
2010 Mar 11
1
[PATCH 1/2] xen: balloon: Fix checkpatch issues
...nclude <linux/sysdev.h>
+#include <linux/uaccess.h>
#include <asm/page.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
-#include <asm/uaccess.h>
#include <asm/tlb.h>
#include <asm/xen/hypervisor.h>
@@ -154,8 +154,7 @@ static struct page *balloon_retrieve(void)
if (PageHighMem(page)) {
balloon_stats.balloon_high--;
inc_totalhigh_pages();
- }
- else
+ } else
balloon_stats.balloon_low--;
totalram_pages++;
@@ -274,7 +273,8 @@ static int decrease_reservation(unsigned long nr_pages)
nr_pages = ARRAY_SIZE(frame_list);
for (i = 0; i &...
2010 Mar 11
1
[PATCH 1/2] xen: balloon: Fix checkpatch issues
...nclude <linux/sysdev.h>
+#include <linux/uaccess.h>
#include <asm/page.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
-#include <asm/uaccess.h>
#include <asm/tlb.h>
#include <asm/xen/hypervisor.h>
@@ -154,8 +154,7 @@ static struct page *balloon_retrieve(void)
if (PageHighMem(page)) {
balloon_stats.balloon_high--;
inc_totalhigh_pages();
- }
- else
+ } else
balloon_stats.balloon_low--;
totalram_pages++;
@@ -274,7 +273,8 @@ static int decrease_reservation(unsigned long nr_pages)
nr_pages = ARRAY_SIZE(frame_list);
for (i = 0; i &...
2010 Mar 11
1
[PATCH 1/2] xen: balloon: Fix checkpatch issues
...nclude <linux/sysdev.h>
+#include <linux/uaccess.h>
#include <asm/page.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
-#include <asm/uaccess.h>
#include <asm/tlb.h>
#include <asm/xen/hypervisor.h>
@@ -154,8 +154,7 @@ static struct page *balloon_retrieve(void)
if (PageHighMem(page)) {
balloon_stats.balloon_high--;
inc_totalhigh_pages();
- }
- else
+ } else
balloon_stats.balloon_low--;
totalram_pages++;
@@ -274,7 +273,8 @@ static int decrease_reservation(unsigned long nr_pages)
nr_pages = ARRAY_SIZE(frame_list);
for (i = 0; i &...
2010 Aug 06
5
[PATCH] GSoC 2010 - Memory hotplug support for Xen guests - second fully working version - once again
...rc = HYPERVISOR_memory_op(XENMEM_populate_physmap, &reservation);
@@ -298,33 +445,17 @@ populate_physmap:
goto out;
for (i = 0; i < rc; i++) {
-#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
- if (balloon_stats.hotplug_start_paddr) {
- ++pfn;
- goto set_p2m;
- }
-#endif
-
page = balloon_retrieve();
BUG_ON(page == NULL);
pfn = page_to_pfn(page);
-
-#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
-set_p2m:
-#endif
BUG_ON(!xen_feature(XENFEAT_auto_translated_physmap) &&
phys_to_machine_mapping_valid(pfn));
set_phys_to_machine(pfn, frame_list[i]);
-#ifdef CONFIG_XE...