qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 0/3] memory: an optimization


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 0/3] memory: an optimization
Date: Mon, 22 Feb 2016 11:22:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0


On 22/02/2016 09:34, Gonglei wrote:
> Perf top tells me qemu_get_ram_ptr consume some cpu cycles.
> 
> Before this optimization:
>   1.26%  qemu-kvm                  [.] qemu_get_ram_ptr
>   0.89%  qemu-kvm                  [.] qemu_get_ram_block
> 
> Applied the patch set:
>  0.87%  qemu-kvm                 [.] qemu_get_ram_ptr
> 
> And Paolo suggested that we can get rid of qemu_get_ram_ptr
> by storing the RAMBlock pointer into the memory region,
> instead of the ram_addr_t value. And after appling this change,
> I got much better performance indeed.
> 
> BTW, PATCH 3 is an occasional find.
> 
> v2:
>  - using 'struct RAMBlock *' instead of 'void *' in patch 1 [Fam]
>  - drop superfluous comments in patch 1 [Fam]
> 
> Gonglei (3):
>   exec: store RAMBlock pointer into memory region
>   memory: optimize qemu_get_ram_ptr and qemu_ram_ptr_length
>   memory: Remove the superfluous code
> 
>  exec.c                | 48 ++++++++++++++++++++++++++++++------------------
>  include/exec/memory.h |  8 ++++----
>  memory.c              |  3 ++-
>  3 files changed, 36 insertions(+), 23 deletions(-)
> 

Thanks Lei and Fam, patches queued.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]