Skip to content

Commit

Permalink
xen/balloon: mark inflated pages PG_offline
Browse files Browse the repository at this point in the history
Mark inflated and never onlined pages PG_offline, to tell the world that
the content is stale and should not be dumped.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: David Hildenbrand <[email protected]>
Reviewed-by: Juergen Gross <[email protected]>
Cc: Boris Ostrovsky <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Alexander Duyck <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Christian Hansen <[email protected]>
Cc: Dave Young <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Haiyang Zhang <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Julien Freche <[email protected]>
Cc: Kairui Song <[email protected]>
Cc: Kazuhito Hagio <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Cc: "K. Y. Srinivasan" <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Lianbo Jiang <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Miles Chen <[email protected]>
Cc: Nadav Amit <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Cc: Omar Sandoval <[email protected]>
Cc: Pankaj gupta <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Pavel Tatashin <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Stephen Hemminger <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Cc: Vitaly Kuznetsov <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Xavier Deguillard <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
davidhildenbrand authored and torvalds committed Mar 6, 2019
1 parent e04b742 commit 77c4adf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/xen/balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ static void xen_online_page(struct page *page, unsigned int order)
for (i = 0; i < size; i++) {
p = pfn_to_page(start_pfn + i);
__online_page_set_limits(p);
__SetPageOffline(p);
__balloon_append(p);
}
mutex_unlock(&balloon_mutex);
Expand Down Expand Up @@ -446,6 +447,7 @@ 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);
}

Expand All @@ -472,6 +474,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp)
state = BP_EAGAIN;
break;
}
__SetPageOffline(page);
adjust_managed_page_count(page, -1);
xenmem_reservation_scrub_page(page);
list_add(&page->lru, &pages);
Expand Down

0 comments on commit 77c4adf

Please sign in to comment.