(try to Cc David and Paolo for some discussion...)

Hi David and Paolo,

If possible, could you share some thoughts about this, because
currently each `memory-backend-file` has their own page cache
on the host, but if QEMU can provide one nvdimm device backed
by multiple files, so that EROFS can share memory in finer
layer granularity on the host.  (we don't need to attach so
many devices, because some container images can be dozens of
layers.)

Without further investigatation, I wonder which direction is
better:

  1) one memory-backend-file backed by multiple files;

  2) nvdimm, virtio-pmem, .. backed by multiple
     `memory-backend-file`s..

Currently I don't have extra slot to look into the QEMU codebase,
but if the idea is acceptable, I will try to work on this later.

Thanks,
Gao Xiang

On 2025/8/1 14:58, Gao Xiang wrote:
Hi folks,

On 2025/7/31 19:14, Shameerali Kolothum Thodi via wrote:


-----Original Message-----
From: Jonathan Cameron <jonathan.came...@huawei.com>
Sent: Thursday, July 31, 2025 11:01 AM
To: Manos Pitsidianakis <manos.pitsidiana...@linaro.org>
Cc: qemu-devel@nongnu.org; Peter Maydell <peter.mayd...@linaro.org>;
qemu-...@nongnu.org; Gustavo Romero <gustavo.rom...@linaro.org>;
Shameerali Kolothum Thodi <shameerali.kolothum.th...@huawei.com>
Subject: Re: [PATCH] hw/arm: add static NVDIMMs in device tree

On Wed, 30 Jul 2025 15:21:41 +0300
Manos Pitsidianakis <manos.pitsidiana...@linaro.org> wrote:

NVDIMM is used for fast rootfs with EROFS, for example by kata
containers. To allow booting with static NVDIMM memory, add them to
the device tree in arm virt machine.

Just another question about the image passthrough via pmem,
I wonder if it's possible for QEMU to support one nvdimm,
virtio-pmem device with multiple memory backend files rather
than just one single file?

Because EROFS can use this way to support multi-layer images,
for example:

  filesystem1:  metadatafile + layerfile1 + layerfile2
  filesystem2:  metadatafile + layerfile1 + layerfile3

so that multiple pmem devices can share the same layer1 page
cache on the host.

More details also see:
  https://erofs.docs.kernel.org/en/latest/merging.html


Many thanks!
Gao Xiang


Reply via email to