[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/5] exec.c: refactor cpu_physical_memory_map
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-devel] [PATCH 4/5] exec.c: refactor cpu_physical_memory_map |
Date: |
Thu, 19 May 2011 18:21:17 +0100 |
User-agent: |
Alpine 2.00 (DEB 1167 2008-08-23) |
On Wed, 18 May 2011, Paolo Bonzini wrote:
> On 05/18/2011 07:52 PM, address@hidden wrote:
> > From: Stefano Stabellini<address@hidden>
> >
> > Introduce qemu_ram_ptr_length that takes an address and a size as
> > parameters rather than just an address.
> >
> > Refactor cpu_physical_memory_map so that we call qemu_ram_ptr_length only
> > once rather than calling qemu_get_ram_ptr one time per page.
> > This is not only more efficient but also tries to simplify the logic of
> > the function.
> > Currently we are relying on the fact that all the pages are mapped
> > contiguously in qemu's address space: we have a check to make sure that
> > the virtual address returned by qemu_get_ram_ptr from the second call on
> > is consecutive. Now we are making this more explicit replacing all the
> > calls to qemu_get_ram_ptr with a single call to qemu_ram_ptr_length
> > passing a size argument.
>
> Would the interface at
> http://permalink.gmane.org/gmane.comp.emulators.qemu/101475 work for you
> alternatively?
Unfortunately that interface doesn't solve the problem I am trying to
address:
cpu_physical_memory_map_fast calls cpu_physical_memory_map_internal that
still calls qemu_get_ram_ptr in a loop.
- [Qemu-devel] [PATCH 0 of 5] xen mapcache fixes and improvements, Stefano Stabellini, 2011/05/18
- [Qemu-devel] [PATCH 1/5] xen: fix qemu_map_cache with size != MCACHE_BUCKET_SIZE, stefano.stabellini, 2011/05/18
- [Qemu-devel] [PATCH 2/5] xen: remove qemu_map_cache_unlock, stefano.stabellini, 2011/05/18
- [Qemu-devel] [PATCH 3/5] xen: remove xen_map_block and xen_unmap_block, stefano.stabellini, 2011/05/18
- [Qemu-devel] [PATCH 5/5] xen: mapcache performance improvements, stefano.stabellini, 2011/05/18
- [Qemu-devel] [PATCH 4/5] exec.c: refactor cpu_physical_memory_map, stefano.stabellini, 2011/05/18