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

Re: Balloon pressuring page cache

From: David Hildenbrand <hidden>
Date: 2020-02-05 09:22:45
Also in: linux-mm

Possibly related (same subject, not in this thread)

quoted
1. Guest allocates a page and sends it to the host.
2. Shrinker gets active and releases that page again.
3. Some user in the guest allocates and modifies that page. The dirty bit is
set in the hypervisor.
The bit will be set in KVM's bitmap, and will be synced to QEMU's bitmap when the next round starts.
quoted
4. The host processes the request and clears the bit in the dirty bitmap.
This clears the bit from the QEMU bitmap, and this page will not be sent in this round.
quoted
5. The guest is stopped and the last set of dirty pages is migrated. The
modified page is not being migrated (because not marked dirty).
When QEMU start the last round, it first syncs the bitmap from KVM, which includes the one set in step 3.
Then the modified page gets sent.
So, if you run a TCG guest and use it with free page reporting, the race
is possible? So the correctness depends on two dirty bitmaps in the
hypervisor and how they interact. wow this is fragile.

Thanks for the info :)

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