| Summary: | [virtio] virtio-balloon does not balloon correctly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | lysfjord.daniel | ||||
| Component: | kern | Assignee: | freebsd-virtualization (Nobody) <virtualization> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | CC: | bms, emaste, rootnode+freebsd, xiangzhedev | ||||
| Priority: | --- | ||||||
| Version: | 14.3-RELEASE | ||||||
| Hardware: | amd64 | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
lysfjord.daniel
2026-01-18 16:58:56 UTC
> See also #198344 and #277473 Clickable links to the two closed reports: bug 198344, bug 277473. Hi, I had create a PR to improve virtio-balloon, can you test it to check if is it fix the error what you see? https://github.com/freebsd/freebsd-src/pull/2116 Thanks a lot (In reply to Xiangzhe from comment #2) It *seems* to be a step in the right direction.. The allocation shrinks by 1MiB every apx. 5 seconds now, and it seems to be going until the target set. I guess dev.vtballoon.0.current and dev.vtballoon.0.desired are in some other unit than KiB.. it's moving in steps of 256 per time virt-manager say it has adjusted the current allocation with 1MiB, pointing me to it being in 4k pages? Since your code has #define VTBALLOON_PAGES_PER_REQUEST 256 I guess the reasoning is sound.. No idea why it only request changes once every 5 seconds, or thereabouts, but at least it tries to work now:) Thank you for test. 256 is reference the Linux kernel source code. And I had push new chance to PR, can you test it if is it fix the slow shrinks? This looks very good:) Can I now have it backported to 14.4, so I can use it on my poudriere-machine?:) Created attachment 269744 [details]
14.4-backport-virtio-balloon-oom
(In reply to Xiangzhe from comment #6) Perfect:) Now, if only the code on the hypervisor-side could care to ask the VM to release memory when under pressure.. But that's not your fault. |