From: Peter Xu <peterx@redhat.com>
To: Chenyi Qiang <chenyi.qiang@intel.com>
Cc: "David Hildenbrand" <david@redhat.com>,
"Alexey Kardashevskiy" <aik@amd.com>,
"Gupta Pankaj" <pankaj.gupta@amd.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Michael Roth" <michael.roth@amd.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org,
"Williams Dan J" <dan.j.williams@intel.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Baolu Lu" <baolu.lu@linux.intel.com>,
"Gao Chao" <chao.gao@intel.com>, "Xu Yilun" <yilun.xu@intel.com>,
"Li Xiaoyao" <xiaoyao.li@intel.com>,
"Cédric Le Goater" <clg@kaod.org>,
"Alex Williamson" <alex.williamson@redhat.com>
Subject: Re: [PATCH v7 0/5] Enable shared device assignment
Date: Wed, 18 Jun 2025 17:58:28 -0400 [thread overview]
Message-ID: <aFM2hFgjiBm3nML6@x1.local> (raw)
In-Reply-To: <20250612082747.51539-1-chenyi.qiang@intel.com>
Hi, Chenyi,
On Thu, Jun 12, 2025 at 04:27:41PM +0800, Chenyi Qiang wrote:
> Relationship with in-place conversion
> -------------------------------------
> In-place page conversion is the ongoing work to allow mmap() of
> guest_memfd to userspace so that both private and shared memory can use
> the same physical memory as the backend. This new design eliminates the
> need to discard pages during shared/private conversions. When it is
> ready, shared device assignment needs be adjusted to achieve an
> unmap-before-conversion-to-private and map-after-conversion-to-shared
> sequence to be compatible with the change.
Is it intentional to be prepared for this?
The question more or less come from the read of patch 5, where I see a
bunch of very similar code versus virtio-mem, like:
ram_block_attributes_for_each_populated_section
ram_block_attributes_for_each_discarded_section
ram_block_attributes_rdm_register_listener
ram_block_attributes_rdm_unregister_listener
Fundamentally, IIUC it's because of the similar structure of bitmap used,
and the listeners. IOW, I wonder if it's possible to move the shared
elements into RamDisgardManager for:
unsigned bitmap_size;
unsigned long *bitmap;
QLIST_HEAD(, RamDiscardListener) rdl_list;
But if we know it'll be a tri-state some day, maybe that means it won't
apply anymore. However the rdl_list is still applicable to be merged if we
want, it's just that it'll be a smaller portion to be shared.
Other than that, even if I don't know how to test this.. I read the patches
today and they look all good. The duplication is a pure question I have
above, but even if so it can also be done on top.
I do plan to pick this up. Paolo/David, any comments before I do?
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2025-06-18 21:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-12 8:27 [PATCH v7 0/5] Enable shared device assignment Chenyi Qiang
2025-06-12 8:27 ` [PATCH v7 1/5] memory: Export a helper to get intersection of a MemoryRegionSection with a given range Chenyi Qiang
2025-06-12 8:27 ` [PATCH v7 2/5] memory: Change memory_region_set_ram_discard_manager() to return the result Chenyi Qiang
2025-06-12 8:27 ` [PATCH v7 3/5] memory: Unify the definiton of ReplayRamPopulate() and ReplayRamDiscard() Chenyi Qiang
2025-06-19 3:06 ` Chenyi Qiang
2025-06-19 14:29 ` Peter Xu
2025-06-20 4:04 ` Chenyi Qiang
2025-06-12 8:27 ` [PATCH v7 4/5] ram-block-attributes: Introduce RamBlockAttributes to manage RAMBlock with guest_memfd Chenyi Qiang
2025-06-20 2:53 ` Chenyi Qiang
2025-06-12 8:27 ` [PATCH v7 5/5] physmem: Support coordinated discarding of RAM " Chenyi Qiang
2025-06-18 21:58 ` Peter Xu [this message]
2025-06-24 9:51 ` [PATCH v7 0/5] Enable shared device assignment David Hildenbrand
2025-06-18 22:22 ` Peter Xu
2025-06-19 3:09 ` Chenyi Qiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aFM2hFgjiBm3nML6@x1.local \
--to=peterx@redhat.com \
--cc=aik@amd.com \
--cc=alex.williamson@redhat.com \
--cc=baolu.lu@linux.intel.com \
--cc=chao.gao@intel.com \
--cc=chenyi.qiang@intel.com \
--cc=clg@kaod.org \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=pankaj.gupta@amd.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=xiaoyao.li@intel.com \
--cc=yilun.xu@intel.com \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.