* [Patch] Don't sync volatile memory
@ 2025-06-16 19:43 Chaney, Ben
2025-06-16 20:35 ` Peter Xu
0 siblings, 1 reply; 3+ messages in thread
From: Chaney, Ben @ 2025-06-16 19:43 UTC (permalink / raw)
To: Peter Xu, David Hildenbrand
Cc: Michael S. Tsirkin, yury-kotov@yandex-team.ru,
dgilbert@redhat.com, beata.michalska@linaro.org,
richard.henderson@linaro.org, alex.bennee@linaro.org,
peter.maydell@linaro.org, junyan.he@intel.com,
imammedo@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com,
philmd@linaro.org, xiaoguangrong.eric@gmail.com, Tottenham, Max,
Hunt, Joshua, Glasgall, Anna, qemu-stable@nongnu.org
Not all pmem regions are backed by non-volatile memory. Syncing volatile
memory provides no benefit, but can cause performance issues is some
cases. Only sync memory that is marked as non-volatile.
Fixes: bd108a44bc29 (migration: ram: Switch to ram block writeback)
---
migration/ram.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/migration/ram.c b/migration/ram.c
index f25ebd9620..e3ab67acd4 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -3930,7 +3930,9 @@ static int ram_load_cleanup(void *opaque)
RAMBlock *rb;
RAMBLOCK_FOREACH_NOT_IGNORED(rb) {
- qemu_ram_block_writeback(rb);
+ if (memory_region_is_nonvolatile(rb->mr)) {
+ qemu_ram_block_writeback(rb);
+ }
}
xbzrle_load_cleanup();
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch] Don't sync volatile memory
2025-06-16 19:43 [Patch] Don't sync volatile memory Chaney, Ben
@ 2025-06-16 20:35 ` Peter Xu
2025-06-16 20:59 ` Chaney, Ben
0 siblings, 1 reply; 3+ messages in thread
From: Peter Xu @ 2025-06-16 20:35 UTC (permalink / raw)
To: Chaney, Ben
Cc: David Hildenbrand, Michael S. Tsirkin, yury-kotov@yandex-team.ru,
dgilbert@redhat.com, beata.michalska@linaro.org,
richard.henderson@linaro.org, alex.bennee@linaro.org,
peter.maydell@linaro.org, junyan.he@intel.com,
imammedo@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com,
philmd@linaro.org, xiaoguangrong.eric@gmail.com, Tottenham, Max,
Hunt, Joshua, Glasgall, Anna, qemu-stable@nongnu.org
On Mon, Jun 16, 2025 at 07:43:02PM +0000, Chaney, Ben wrote:
> Not all pmem regions are backed by non-volatile memory. Syncing volatile
> memory provides no benefit, but can cause performance issues is some
> cases. Only sync memory that is marked as non-volatile.
>
> Fixes: bd108a44bc29 (migration: ram: Switch to ram block writeback)
Do you plan to work on qemu in the future? If so, I suggest you go
through this and repost:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html
If the answer is no, I'll at least need your Signed-off-By: line here, then
I can fix all the rest for you. The patch looks ok though.
Thanks,
>
> ---
> migration/ram.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/migration/ram.c b/migration/ram.c
> index f25ebd9620..e3ab67acd4 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -3930,7 +3930,9 @@ static int ram_load_cleanup(void *opaque)
> RAMBlock *rb;
>
> RAMBLOCK_FOREACH_NOT_IGNORED(rb) {
> - qemu_ram_block_writeback(rb);
> + if (memory_region_is_nonvolatile(rb->mr)) {
> + qemu_ram_block_writeback(rb);
> + }
> }
>
> xbzrle_load_cleanup();
> --
> 2.40.1
>
>
>
>
--
Peter Xu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch] Don't sync volatile memory
2025-06-16 20:35 ` Peter Xu
@ 2025-06-16 20:59 ` Chaney, Ben
0 siblings, 0 replies; 3+ messages in thread
From: Chaney, Ben @ 2025-06-16 20:59 UTC (permalink / raw)
To: Peter Xu
Cc: David Hildenbrand, Michael S. Tsirkin, yury-kotov@yandex-team.ru,
dgilbert@redhat.com, beata.michalska@linaro.org,
richard.henderson@linaro.org, alex.bennee@linaro.org,
peter.maydell@linaro.org, junyan.he@intel.com,
imammedo@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com,
philmd@linaro.org, xiaoguangrong.eric@gmail.com, Tottenham, Max,
Hunt, Joshua, Glasgall, Anna, qemu-stable@nongnu.org
On 6/16/25, 4:35 PM, "Peter Xu" <peterx@redhat.com <mailto:peterx@redhat.com>> wrote:
> On Mon, Jun 16, 2025 at 07:43:02PM +0000, Chaney, Ben wrote:
>> Not all pmem regions are backed by non-volatile memory. Syncing volatile
>> memory provides no benefit, but can cause performance issues is some
>> cases. Only sync memory that is marked as non-volatile.
>>
>> Fixes: bd108a44bc29 (migration: ram: Switch to ram block writeback)
>
> Do you plan to work on qemu in the future? If so, I suggest you go
> through this and repost:
Hi Peter,
I resent the patch with a Signed-off-By: line and rebased against master.
Please let me know if anything else is needed.
Thanks,
Ben
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-16 21:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 19:43 [Patch] Don't sync volatile memory Chaney, Ben
2025-06-16 20:35 ` Peter Xu
2025-06-16 20:59 ` Chaney, Ben
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.