On Tue, Sep 29, 2026 at 08:32:41PM +0800, Jialiang Huang wrote: > Hi all, > > I'm an engineer at DeepSeek. Thanks for the discussion, and thanks > to everyone working on DAMON and virtio-balloon free-page reporting. > They have been very useful for our workloads. > > Gao Xiang wrote: > > It can cause sync 4K faults on the host in the worst case > > This is one of our concerns with virtio-pmem as well: moving I/O onto > the page-fault path can introduce performance trade-offs. The other > concern is the substantial struct page overhead for large images. > > For now, we enable virtio-pmem only for moderately sized, frequently > used read-only images, where there is more opportunity to share the > same host page cache across sandboxes, as Gao pointed out. > > Muchun's vmemmap work is also interesting to us. My understanding is > that it allocates private backing for struct page metadata on demand, > which could help reduce the upfront memory overhead for large images.
Although I haven't had a chance and time to look into that, the main concern from me is that mmap() access will call "dax_fault_iter->vmemmap_materialize_page()", and malicious sandbox workloads (or not malicious, just valid mmap workloads) can cause guest memory OOMs due to "struct page balloon" for large rootfs in the worst cases and cause the follow-up mmap access failure, because the guest memory size may not even fulfill "struct page" for large rootfs. Thanks, Gao Xiang > > For disks without virtio-pmem, DAMON with virtio-balloon free-page > reporting lets us reclaim cold guest page-cache pages and return > the memory to the host, without those virtio-pmem-specific issues. > The two approaches complement each other in our setup. > > We have not yet fully explored how best to tune the DAMON and free-page > reporting parameters for our workloads. For example, the kernel's default > free-page reporting granularity is 2 MiB, which is fairly coarse: > reclaiming cold pages does not necessarily produce free blocks of that > size. We still need to evaluate how finer reporting granularity and > different DAMON settings affect memory savings and workload performance. > > Best, > Jialiang Huang
