[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dae84252-1d61-499b-8297-54ad41d9a518@gmail.com>
Date: Mon, 19 Jan 2026 16:30:44 +0000
From: "Thomson, Jack" <jackabt.amazon@...il.com>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>, mst@...hat.com,
jasowang@...hat.com
Cc: xuanzhuo@...ux.alibaba.com, eperezma@...hat.com,
virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org,
kalyazin@...zon.co.uk, xmarcalx@...zon.co.uk, jackabt@...zon.com
Subject: Re: [RFC PATCH] virtio_balloon: Support wait on ACK for hinting
On 19/01/2026 3:50 pm, David Hildenbrand (Red Hat) wrote:
> On 1/19/26 16:42, Jack Thomson wrote:
>> From: Jack Thomson <jackabt@...zon.com>
>>
>> This RFC patch adds a new virtio feature for the virtio-balloon driver
>> during free page hinting, which will wait on device ack before
>> committing the range to the free_page_list. The reason for the change is
>> it allows the device to modify this range without it being reclaimed
>> from the free_page_list before the ack is sent. As expected, testing
>> shows this adds overhead to the hinting run duration, increasing it by
>> ~30% with our Firecracker setup. Currently free page hinting is used
>> mainly for live migration, but this would open it up for a new use-case.
>>
>> We would like to leverage this with MADV_DONTNEED to reduce RSS of a
>> guest. We'd like to use hinting because of the flexibility of control it
>> brings compared to reporting, allowing memory to be reclaimed in
>> deterministic periods.
>
> Can you elaborate in more detail why you don't simply use reporting,
> like QEMU?
Ideally we'd like to use hinting as the API allows us to control when
this reclamation takes place so as not to impact active VMs. For example
if we know a VM is idle we can reclaim memory but also cancel the
reclamation quickly if the VM receives new work (something we can't do
quickly with the traditional balloon.)
> Could you instead see optimizations being done to reporting that could
> make it fly for your use case?
One thing that I considered was having reporting running but skip
reported ranges during active times. But this may lead to missing
reclamation opportunities.
>
> Hinting is a rather special case thing only used for reducing VM
> migration time in QEMU AFAIR.
>
Yeah, its API allowing direct control was what interested us. With this
extension it made a great pairing just needed the synchronisation to
make it safe.
--
Thanks,
Jack
Powered by blists - more mailing lists