[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [regression] Bug 221745 - PV DomU ballooning driver init issue


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Thorsten Leemhuis <regressions@xxxxxxxxxxxxx>
  • From: Yannick Martin <yannick.martin@xxxxxxxxx>
  • Date: Thu, 30 Jul 2026 11:36:58 +0200
  • Arc-authentication-results: i=1; yop24.okazoo.eu; arc=none smtp.remote-ip="2001:861:81:ab03:a8da:71bb:ac4c:8efe"
  • Arc-message-signature: i=1; d=okazoo.eu; s=_arc_yop20260218; a=rsa-sha256; c=relaxed/relaxed; t=1785404207; h=DKIM-Signature:Content-Type:Message-ID:Date:MIME-Version:User-Agent: Subject:From:To:Cc:References:Content-Language:In-Reply-To; bh=sQRMRRFPnLwRU9VpwRbZlfnzUOMkA2Be4k9DBLnfosU=; b=cJ7hNsdpSIIXXEdQJaG8HiWfNTm37glBjrVYoOS3DSDzLbLQbyMzOvN8RW7o4R0SKimF GNa+TOLC9Kea3D0Z9KqYBW/7qflo73jt4NrY1XQZWGCB6AWSV4n4LI7p25EONyHa3nttH bwICtyhVKSdvuPZrUG89GzzmGGkQb5Be/kD8OAVIAsL+OWkTPfxaOJNdXHiH46Rp7iXNl 3ptvBdRIR+Xn+ecqdHq9f8N/c2Thvj4FRXqRzM1aCeBvGLWpIiqM7Vxt5OSvxGvPljKas xBFgeND0Tmr4AJ50LGhU1SOb56EWDlwskcdnXp3c7BGzYCF7q9blaB2FDX5haMsDn1w==
  • Arc-seal: i=1; d=okazoo.eu; s=_arc_yop20260218; a=rsa-sha256; cv=none; t=1785404207; b=U7E6nRuEKu5gH0YdoAMZuc+jwsPWpXB9w1C90boZ+J9EOR7+7My0cqN21SDkO9YEJqwA vOWHLmq05gXt4i+NhD8qpZzo1EShRev4eRQl0PLqpqZCw96Rkyswfn7lgXtwNqV9DefTx 5WmikfKD5KUaYzpkcIcyXkug5aGUIjmyB9PcufsEIpoWXV1mKIAGnheIQCifF28Rd7G1E RQwYvNl5ihz/N5G1CBn9q4CotYvqf8mVzL9C5E7unWWlHpHaYqG+UEP8DsSI87sbKJDuA 2agk6gQU44h6XHa03GkZSFCWYikBiLGlex7aSz2FIoEUN6eIYhuPqFsjqVkP3Pv8FrA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=yop20250924 header.d=okazoo.eu header.i="@okazoo.eu" header.h="Content-Type:Message-ID:Date:MIME-Version:User-Agent:Subject:From:To:Cc:References:Content-Language:In-Reply-To"
  • Authentication-results: yop24.okazoo.eu; arc=none smtp.remote-ip="2001:861:81:ab03:a8da:71bb:ac4c:8efe"
  • Cc: Juergen Gross <jgross@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Linux kernel regressions list <regressions@xxxxxxxxxxxxxxx>, yannick.martin+kernelorg@xxxxxxxxx
  • Delivery-date: Thu, 30 Jul 2026 10:30:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello

It works !!!

uname -a
Linux status 7.2.0-rc3-xendomu #1 SMP PREEMPT Thu Jul 30 10:39:13 CEST 2026 x86_64 GNU/Linux

# ps auxwwwf | grep -i ball
root          48  0.0  0.0      0     0 ?        S    11:33   0:00  \_ [xen-balloon]

dmesg  | grep -i ballo
[    0.436657] xen:balloon: Initialising balloon driver

domU memory resize works, tested 1024m -> 1200m -> 1000m.

Regards


Le 27/07/2026 à 19:10, Yannick Martin a écrit :
Hello

I will try this tomorrow !

Regards


Le 27 juillet 2026 18:51:15 GMT+02:00, "Roger Pau Monné" <roger.pau@xxxxxxxxxx> a écrit :
On Mon, Jul 27, 2026 at 10:42:25AM +0200, Thorsten Leemhuis wrote:
Hi Roger! FYI, it seems your change 0949c646d64697 ("Partial revert "x86/xen: fix balloon target initialization for PVH dom0"") [v7.0-rc1] caued a regression. For details see https://bugzilla.kernel.org/show_bug.cgi?id=221745 To quote the initial comment:
Since commit db8c4b1 (Partial revert "x86/xen: fix balloon target initialization for PVH dom0"), xen ballooning fails to init correctly on domU (on amd64 arch) with the following configuration: -- xl.cfg ... memory = '2048' maxmem = '4096' ... -- -- domU balloon dmesg (init fails) [ 0.908337] xen:balloon: Initialising balloon driver [ 0.940721] Extra pages underflow current target
Yeah, I'm afraid the original fix commit didn't fully fix the issues, so there's the following change (chunk below) that's needed additionally to cope with memory != maxmem on PV guests. I've done some basic testing and it seems to solve the issue, could you give it a spin also? (just to make sure I'm not missing anything else). Thanks, Roger.
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index e7f1d4ca6d75..c20a1ff8292d 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -703,19 +703,26 @@ static int __init balloon_add_regions(void) balloon_append(pfn_to_page(pfn)); /* - * Extra regions are accounted for in the physmap, but need - * decreasing from current_pages and target_pages to balloon - * down the initial allocation, because they are already - * accounted for in total_pages. + * For HVM domains: extra regions are accounted for in the + * physmap, but need decreasing from current_pages and + * target_pages to balloon down the initial allocation, because + * they are already accounted for in total_pages. + * + * For PV domains: extra regions are not accounted for in the + * initial memory target, and hence need adding to the stats as + * additional unpopulated regions. */ pages = extra_pfn_end - start_pfn; - if (pages >= balloon_stats.current_pages || - pages >= balloon_stats.target_pages) { + if (xen_pv_domain()) { + balloon_stats.total_pages += pages; + } else if (pages >= balloon_stats.current_pages || + pages >= balloon_stats.target_pages) { WARN(1, "Extra pages underflow current target"); return -ERANGE; + } else { + balloon_stats.current_pages -= pages; + balloon_stats.target_pages -= pages; } - balloon_stats.current_pages -= pages; - balloon_stats.target_pages -= pages; } return 0;


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.