Skip to content

Commit f6a09e6

Browse files
PacheNicoakpm00
authored andcommitted
xen: balloon: update the NR_BALLOON_PAGES state
Update the NR_BALLOON_PAGES counter when pages are added to or removed from the Xen balloon. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Nico Pache <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Cc: Alexander Atanasov <[email protected]> Cc: Chengming Zhou <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Dexuan Cui <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Juegren Gross <[email protected]> Cc: Kanchana P Sridhar <[email protected]> Cc: K. Y. Srinivasan <[email protected]> Cc: "Michael S. Tsirkin" <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Muchun Song <[email protected]> Cc: Nhat Pham <[email protected]> Cc: Oleksandr Tyshchenko <[email protected]> Cc: Roman Gushchin <[email protected]> Cc: Shakeel Butt <[email protected]> Cc: Stefano Stabellini <[email protected]> Cc: Wei Liu <[email protected]> Cc: Michael Kelley <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 02ec359 commit f6a09e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/xen/balloon.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ static void balloon_append(struct page *page)
157157
list_add(&page->lru, &ballooned_pages);
158158
balloon_stats.balloon_low++;
159159
}
160+
inc_node_page_state(page, NR_BALLOON_PAGES);
161+
160162
wake_up(&balloon_wq);
161163
}
162164

@@ -179,6 +181,8 @@ static struct page *balloon_retrieve(bool require_lowmem)
179181
balloon_stats.balloon_low--;
180182

181183
__ClearPageOffline(page);
184+
dec_node_page_state(page, NR_BALLOON_PAGES);
185+
182186
return page;
183187
}
184188

0 commit comments

Comments
 (0)