[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [RFC 1/5] virtio-balloon: Remove unnecessary
Re: [Qemu-ppc] [Qemu-devel] [RFC 1/5] virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate
Sat, 13 Oct 2018 17:23:51 +1100
On Fri, Oct 12, 2018 at 10:41:33AM -0700, Richard Henderson wrote:
> On 10/11/18 8:24 PM, David Gibson wrote:
> > When the balloon is inflated, we discard memory place in it using madvise()
> > with MADV_DONTNEED. And when we deflate it we use MADV_WILLNEED, which
> > sounds like it makes sense but is actually unnecessary.
> > The misleadingly named MADV_DONTNEED just discards the memory in question,
> > it doesn't set any persistent state on it in-kernel; all that's necessary
> > to bring the memory back is to touch it.
> Isn't the point of deflate to free up host memory, for use by other guests or
As Eric notes, I think you have inflate and deflate the wrong way around.
> If you do nothing upon deflate, then that doesn't actually happen. It seems
> me that this is backward and you should use DONTNEED on deflate and then
> inflate should do nothing.
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
Description: PGP signature
[Qemu-ppc] [RFC 4/5] virtio-balloon: Use ram_block_discard_range() instead of raw madvise(), David Gibson, 2018/10/11
[Qemu-ppc] [RFC 5/5] virtio-balloon: Safely handle BALLOON_PAGE_SIZE < host page size, David Gibson, 2018/10/11
- Re: [Qemu-ppc] [RFC 3/5] virtio-balloon: Rework ballon_page() interface, (continued)