Re: VIRTIO_BALLOON_F_FREE_PAGE_HINT

3 messages, 2 authors, 2019-10-04 · open the first message on its own page

Re: VIRTIO_BALLOON_F_FREE_PAGE_HINT

From: David Hildenbrand <hidden>
Date: 2019-10-04 08:06:03

On 04.10.19 01:15, Tyler Sanderson wrote:
I was mistaken, the problem with overcommit accounting is not fixed by
the change to shrinker interface.
This means that large allocations are stopped even if they could succeed
by deflating the balloon.
Please note that some people use the balloon for actual memory unplug -
so initiating to deflate the balloon under any circumstances is
undesired. It's different with "VIRTIO_BALLOON_F_DEFLATE_ON_OOM" being
set - however that is barely the case (at least in the setups I know :) ).

So yes, free page reporting is a different thing, because it really is
used to "hint" and not to "agree to unplug" in any scenario.

-- 

Thanks,

David / dhildenb

Re: VIRTIO_BALLOON_F_FREE_PAGE_HINT

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: 2019-10-04 08:35:46

On Fri, Oct 04, 2019 at 10:06:03AM +0200, David Hildenbrand wrote:
On 04.10.19 01:15, Tyler Sanderson wrote:
quoted
I was mistaken, the problem with overcommit accounting is not fixed by
the change to shrinker interface.
This means that large allocations are stopped even if they could succeed
by deflating the balloon.
Please note that some people use the balloon for actual memory unplug -
so initiating to deflate the balloon under any circumstances is
undesired. It's different with "VIRTIO_BALLOON_F_DEFLATE_ON_OOM" being
set - however that is barely the case (at least in the setups I know :) ).

So yes, free page reporting is a different thing, because it really is
used to "hint" and not to "agree to unplug" in any scenario.

-- 

Thanks,

VIRTIO_BALLOON_F_DEFLATE_ON_OOM isn't really well thought through
at the spec level either. For example, when will we inflate again?
Current code does this at the next interrupt, which requires
host to somehow know it's time to inflate.

-- 
MST

Re: VIRTIO_BALLOON_F_FREE_PAGE_HINT

From: David Hildenbrand <hidden>
Date: 2019-10-04 08:56:37

On 04.10.19 10:35, Michael S. Tsirkin wrote:
On Fri, Oct 04, 2019 at 10:06:03AM +0200, David Hildenbrand wrote:
quoted
On 04.10.19 01:15, Tyler Sanderson wrote:
quoted
I was mistaken, the problem with overcommit accounting is not fixed by
the change to shrinker interface.
This means that large allocations are stopped even if they could succeed
by deflating the balloon.
Please note that some people use the balloon for actual memory unplug -
so initiating to deflate the balloon under any circumstances is
undesired. It's different with "VIRTIO_BALLOON_F_DEFLATE_ON_OOM" being
set - however that is barely the case (at least in the setups I know :) ).

So yes, free page reporting is a different thing, because it really is
used to "hint" and not to "agree to unplug" in any scenario.

-- 

Thanks,

VIRTIO_BALLOON_F_DEFLATE_ON_OOM isn't really well thought through
at the spec level either. For example, when will we inflate again?
Current code does this at the next interrupt, which requires
host to somehow know it's time to inflate.
The host has access to memory stats of the guest, so it could come up
with some heuristics - but I do agree that is not well thought through -
one reason why it is barely used :)

-- 

Thanks,

David / dhildenb
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help