[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V4 04/19] machine: aux-ram-share option
From: |
Peter Xu |
Subject: |
Re: [PATCH V4 04/19] machine: aux-ram-share option |
Date: |
Mon, 9 Dec 2024 14:54:56 -0500 |
On Mon, Dec 02, 2024 at 05:19:56AM -0800, Steve Sistare wrote:
> diff --git a/system/physmem.c b/system/physmem.c
> index 36f0811..0bcb2cc 100644
> --- a/system/physmem.c
> +++ b/system/physmem.c
> @@ -2164,6 +2164,9 @@ RAMBlock *qemu_ram_alloc_internal(ram_addr_t size,
> ram_addr_t max_size,
> new_block->flags = ram_flags;
>
> if (!host && !xen_enabled()) {
> + if (!share_flags && current_machine->aux_ram_share) {
> + new_block->flags |= RAM_SHARED;
> + }
Just to mention that if you agree with what I said in patch 2, here it will
need some trivial rebase change. IOW, IMO we shouldn't special case xen
either here, so it should also apply to xen if one chose to, changing aux
alloc to RAM_SHARED.
Frankly I don't know whether xen respects RAM_SHARED at all for anonymous,
but it's a separate question to ask..
Basically what will happen later is in cpr-transfer migrate cmd, it'll fail
for xen properly seeing fd==-1. That'll be fine, IMHO.
> if ((new_block->flags & RAM_SHARED) &&
> !qemu_ram_alloc_shared(new_block, &local_err)) {
> goto err;
--
Peter Xu
[PATCH V4 14/19] migration: cpr-transfer mode, Steve Sistare, 2024/12/02
[PATCH V4 15/19] tests/migration-test: memory_backend, Steve Sistare, 2024/12/02
[PATCH V4 13/19] migration: cpr-transfer save and load, Steve Sistare, 2024/12/02
[PATCH V4 18/19] migration-test: cpr-transfer, Steve Sistare, 2024/12/02