summaryrefslogtreecommitdiffstats
path: root/drivers/xen/balloon.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2019-10-01 11:01:52 +0200
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2019-10-01 21:52:53 +0200
commit04ccbdc390b14d8fdc4612abbf023ff49cdc5cd8 (patch)
tree0b688d012af75501df9038a68d20075e36f211e3 /drivers/xen/balloon.c
parentxen/balloon: Mark pages PG_offline in balloon_append() (diff)
downloadlinux-04ccbdc390b14d8fdc4612abbf023ff49cdc5cd8.tar.xz
linux-04ccbdc390b14d8fdc4612abbf023ff49cdc5cd8.zip
xen/balloon: Clear PG_offline in balloon_retrieve()
Let's move the clearing to balloon_retrieve(). In bp_state increase_reservation(), we now clear the flag a little earlier than before, however, this should not matter for XEN. Suggested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Juergen Gross <jgross@suse.com> Cc: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r--drivers/xen/balloon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 8c245e99bb06..5bae515c8e25 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -189,6 +189,7 @@ static struct page *balloon_retrieve(bool require_lowmem)
else
balloon_stats.balloon_low--;
+ __ClearPageOffline(page);
return page;
}
@@ -440,7 +441,6 @@ static enum bp_state increase_reservation(unsigned long nr_pages)
xenmem_reservation_va_mapping_update(1, &page, &frame_list[i]);
/* Relinquish the page back to the allocator. */
- __ClearPageOffline(page);
free_reserved_page(page);
}
@@ -606,7 +606,6 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages)
while (pgno < nr_pages) {
page = balloon_retrieve(true);
if (page) {
- __ClearPageOffline(page);
pages[pgno++] = page;
#ifdef CONFIG_XEN_HAVE_PVMMU
/*