The patch titled Subject: xen: balloon: update the NR_BALLOON_PAGES state has been added to the -mm mm-unstable branch. Its filename is xen-balloon-update-the-nr_balloon_pages-state.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/xen-balloon-update-the-nr_balloon_pages-state.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Nico Pache <npache@xxxxxxxxxx> Subject: xen: balloon: update the NR_BALLOON_PAGES state Date: Fri, 14 Mar 2025 15:37:57 -0600 Update the NR_BALLOON_PAGES counter when pages are added to or removed from the Xen balloon. Link: https://lkml.kernel.org/r/20250314213757.244258-5-npache@xxxxxxxxxx Signed-off-by: Nico Pache <npache@xxxxxxxxxx> Cc: Alexander Atanasov <alexander.atanasov@xxxxxxxxxxxxx> Cc: Chengming Zhou <chengming.zhou@xxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Dexuan Cui <decui@xxxxxxxxxxxxx> Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Juegren Gross <jgross@xxxxxxxx> Cc: Kanchana P Sridhar <kanchana.p.sridhar@xxxxxxxxx> Cc: K. Y. Srinivasan <kys@xxxxxxxxxxxxx> Cc: "Michael S. Tsirkin" <mst@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Muchun Song <muchun.song@xxxxxxxxx> Cc: Nhat Pham <nphamcs@xxxxxxxxx> Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> Cc: Roman Gushchin <roman.gushchin@xxxxxxxxx> Cc: Shakeel Butt <shakeel.butt@xxxxxxxxx> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Wei Liu <wei.liu@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/xen/balloon.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/xen/balloon.c~xen-balloon-update-the-nr_balloon_pages-state +++ a/drivers/xen/balloon.c @@ -157,6 +157,8 @@ static void balloon_append(struct page * list_add(&page->lru, &ballooned_pages); balloon_stats.balloon_low++; } + inc_node_page_state(page, NR_BALLOON_PAGES); + wake_up(&balloon_wq); } @@ -179,6 +181,8 @@ static struct page *balloon_retrieve(boo balloon_stats.balloon_low--; __ClearPageOffline(page); + dec_node_page_state(page, NR_BALLOON_PAGES); + return page; } _ Patches currently in -mm which might be from npache@xxxxxxxxxx are meminfo-add-a-per-node-counter-for-balloon-drivers.patch balloon_compaction-update-the-nr_balloon_pages-state.patch hv_balloon-update-the-nr_balloon_pages-state.patch xen-balloon-update-the-nr_balloon_pages-state.patch