diff options
author | David Hildenbrand <david@redhat.com> | 2019-03-05 18:42:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-06 00:07:14 -0500 |
commit | 77c4adf6a6df6f8f39807eaed48eb73d0eb4261e (patch) | |
tree | 887c5b3e77483621393a2a1061956b1dfd873cac | |
parent | e04b742f74c236202b7a505c2688068969d00e65 (diff) |
xen/balloon: mark inflated pages PG_offline
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/20181119101616.8901-5-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Baoquan He <bhe@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Christian Hansen <chansen3@cisco.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Julien Freche <jfreche@vmware.com>
Cc: Kairui Song <kasong@redhat.com>
Cc: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Lianbo Jiang <lijiang@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Miles Chen <miles.chen@mediatek.com>
Cc: Nadav Amit <namit@vmware.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Pankaj gupta <pagupta@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Xavier Deguillard <xdeguillard@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/xen/balloon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index d107447c47de..39b229f9e256 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -380,6 +380,7 @@ static void xen_online_page(struct page *page, unsigned int order) | |||
380 | for (i = 0; i < size; i++) { | 380 | for (i = 0; i < size; i++) { |
381 | p = pfn_to_page(start_pfn + i); | 381 | p = pfn_to_page(start_pfn + i); |
382 | __online_page_set_limits(p); | 382 | __online_page_set_limits(p); |
383 | __SetPageOffline(p); | ||
383 | __balloon_append(p); | 384 | __balloon_append(p); |
384 | } | 385 | } |
385 | mutex_unlock(&balloon_mutex); | 386 | mutex_unlock(&balloon_mutex); |
@@ -446,6 +447,7 @@ static enum bp_state increase_reservation(unsigned long nr_pages) | |||
446 | xenmem_reservation_va_mapping_update(1, &page, &frame_list[i]); | 447 | xenmem_reservation_va_mapping_update(1, &page, &frame_list[i]); |
447 | 448 | ||
448 | /* Relinquish the page back to the allocator. */ | 449 | /* Relinquish the page back to the allocator. */ |
450 | __ClearPageOffline(page); | ||
449 | free_reserved_page(page); | 451 | free_reserved_page(page); |
450 | } | 452 | } |
451 | 453 | ||
@@ -472,6 +474,7 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) | |||
472 | state = BP_EAGAIN; | 474 | state = BP_EAGAIN; |
473 | break; | 475 | break; |
474 | } | 476 | } |
477 | __SetPageOffline(page); | ||
475 | adjust_managed_page_count(page, -1); | 478 | adjust_managed_page_count(page, -1); |
476 | xenmem_reservation_scrub_page(page); | 479 | xenmem_reservation_scrub_page(page); |
477 | list_add(&page->lru, &pages); | 480 | list_add(&page->lru, &pages); |