[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC] exec: remove duplicate madvise to QEMU_MADV
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH RFC] exec: remove duplicate madvise to QEMU_MADV_DONTFORK |
Date: |
Fri, 9 Sep 2016 17:10:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 09/09/2016 12:02, Cao jin wrote:
> kvm_setup_guest_memory() also just does "madivse to QEMU_MADV_DONTFORK".
>
> Signed-off-by: Cao jin <address@hidden>
> ---
>
> Though I don't understand these code well, tt seems is duplicate code to me.
> But I am not sure whether I am doing the right thing, so, RFC.
>
> exec.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/exec.c b/exec.c
> index 80398b0..819f7cd 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1623,9 +1623,6 @@ static void ram_block_add(RAMBlock *new_block, Error
> **errp)
> qemu_ram_setup_dump(new_block->host, new_block->max_length);
> qemu_madvise(new_block->host, new_block->max_length,
> QEMU_MADV_HUGEPAGE);
> qemu_madvise(new_block->host, new_block->max_length,
> QEMU_MADV_DONTFORK);
> - if (kvm_enabled()) {
> - kvm_setup_guest_memory(new_block->host, new_block->max_length);
> - }
> }
> }
>
>
I guess it can be removed. If you want to do so, please remove
kvm_setup_guest_memory completely. Also please add a comment before the
qemu_madvise, saying that this is also needed by KVM if there is no
synchronous MMU.
Paolo