Thread (45 messages) 45 messages, 5 authors, 2020-02-06

Re: Balloon pressuring page cache

From: David Hildenbrand <hidden>
Date: 2020-02-04 08:49:03
Also in: linux-mm

Possibly related (same subject, not in this thread)

On 04.02.20 09:40, Michael S. Tsirkin wrote:
On Tue, Feb 04, 2020 at 09:35:21AM +0100, David Hildenbrand wrote:
quoted
quoted
quoted
quoted
I would say reverting probably makes sense. I'm not sure there is much
value to having a shrinker running deflation when you are actively trying
to increase the balloon. It would make more sense to wait until you are
actually about to start hitting oom.
I think the shrinker makes sense for free page hinting feature
(everything on free_page_list).

So instead of only reverting, I think we should split it up and always
register the shrinker for VIRTIO_BALLOON_F_FREE_PAGE_HINT and the OOM
notifier (as before) for VIRTIO_BALLOON_F_MUST_TELL_HOST.
s/VIRTIO_BALLOON_F_MUST_TELL_HOST/VIRTIO_BALLOON_F_DEFLATE_ON_OOM/

:)
Well VIRTIO_BALLOON_F_MUST_TELL_HOST is also broken by shrinker
with VIRTIO_BALLOON_F_FREE_PAGE_HINT as that code adds buffers
but does not wait for them to be used even with VIRTIO_BALLOON_F_MUST_TELL_HOST.
We never noticed because QEMU does not advertize
VIRTIO_BALLOON_F_MUST_TELL_HOST.
Will try to figure out how to best undo this mess :)
quoted
quoted
quoted
(Of course, adapting what is being done in the shrinker and in the OOM
notifier)
David,

Please keep me posted. I decided to adapt the same solution as the virtio
balloon for the VMware balloon. If the verdict is that this is damaging and
the OOM notifier should be used instead, I will submit patches to move to
OOM notifier as well.
Will do. It all sounds sub-optimal to me at this point ... but I prefer
the old variant where a simple "drop_slab()" won't deflate the balloon.
That looks broken to me.
Okay. Could you post a patch?
I can give it a shot.

-- 
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