All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/5] xen mapcache fixes and improvements
@ 2011-05-19 17:34 ` Stefano Stabellini
  0 siblings, 0 replies; 33+ messages in thread
From: Stefano Stabellini @ 2011-05-19 17:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: xen-devel, Alexander Graf, Stefano Stabellini

Hi all,
this patch series introduces a series of fixes and improvements to the
xen mapcache in qemu.

Changes compared to v1:
    - remove the two includes from xen-mapcache.h.


The list of patches with a diffstat follows:

Stefano Stabellini (5):
      xen: fix qemu_map_cache with size != MCACHE_BUCKET_SIZE
      xen: remove qemu_map_cache_unlock
      xen: remove xen_map_block and xen_unmap_block
      exec.c: refactor cpu_physical_memory_map
      xen: mapcache performance improvements

 cpu-common.h        |    1 +
 exec.c              |   88 ++++++++++++++++----------------
 xen-mapcache-stub.c |    8 ---
 xen-mapcache.c      |  141 +++++++++++++++++++++++---------------------------
 xen-mapcache.h      |   16 ------
 5 files changed, 109 insertions(+), 145 deletions(-)


Most of them are just straightforward cleanups and only touch Xen code.

The first patch fixes the current mapcache implementation that even
though provides a size parameter isn't actually able to cope with sizes
other than 0 or the bucket size.

The second and the third patch remove some not very useful mapcache
related functions and replace them with proper calls to qemu_map_cache
and qemu_invalidate_entry. In particular in the case of xen_map_block
and xen_unmap_block it wasn't possible before because of the size
problem describe above.

The fourth patch refactors cpu_physical_memory_map to simplify the
implementation and replace multiple calls to qemu_get_ram_ptr with a
single call to a new function that takes an address and a size a
parameters. Hopefully the changes make the function easier to understand
and more efficient.
Comments and reviews on this patch are very very welcome.

The last patch introduces few interesting performance improvements:
assuming that qemu_get_ram_ptr is only called to perform one of the
following two actions:

1) map an entire block other than the main ram block (offset == 0);

2) map a single page in the main ram block to issue a read or a write
straight after the call;

we can make the conscious decision of avoid locking the mapcache entries
for case 2).
Then considering that qemu_put_ram_ptr is called to unmap pages in the
same two cases as before, and considering that we don't need to unmap
unlocked mapcache entries, we can avoid calling qemu_invalidate_entry
completely.

A git tree with the patch series applied to the latest qemu is available
here:

git://xenbits.xen.org/people/sstabellini/qemu-dm.git mapcache_fixes_2

- Stefano

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2011-07-22  6:44 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 17:34 [Qemu-devel] [PATCH v2 0/5] xen mapcache fixes and improvements Stefano Stabellini
2011-05-19 17:34 ` Stefano Stabellini
2011-05-19 17:35 ` [Qemu-devel] [PATCH v2 1/5] xen: fix qemu_map_cache with size != MCACHE_BUCKET_SIZE stefano.stabellini
2011-05-19 17:35   ` stefano.stabellini
2011-05-19 17:35 ` [Qemu-devel] [PATCH v2 2/5] xen: remove qemu_map_cache_unlock stefano.stabellini
2011-05-19 17:35   ` stefano.stabellini
2011-05-19 17:35 ` [Qemu-devel] [PATCH v2 3/5] xen: remove xen_map_block and xen_unmap_block stefano.stabellini
2011-05-19 17:35   ` stefano.stabellini
2011-05-19 17:35 ` [Qemu-devel] [PATCH v2 4/5] exec.c: refactor cpu_physical_memory_map stefano.stabellini
2011-05-19 17:35   ` stefano.stabellini
2011-07-11 22:17   ` [Qemu-devel] " Jan Kiszka
2011-07-11 22:17     ` Jan Kiszka
2011-07-12  6:14     ` [Qemu-devel] " Alexander Graf
2011-07-12  6:14       ` Alexander Graf
2011-07-12  6:21     ` [Qemu-devel] " Alexander Graf
2011-07-12  6:21       ` Alexander Graf
2011-07-12  6:28     ` [Qemu-devel] " Alexander Graf
2011-07-12  6:28       ` Alexander Graf
2011-07-12  7:15       ` [Qemu-devel] " Jan Kiszka
2011-07-12  7:15         ` Jan Kiszka
2011-07-12  7:18         ` [Qemu-devel] " Paolo Bonzini
2011-07-12  7:18           ` Paolo Bonzini
2011-07-12  7:48           ` [Qemu-devel] " Markus Armbruster
2011-07-22  5:42   ` Liu Yu-B13201
2011-07-22  5:42     ` Liu Yu-B13201
2011-07-22  5:59     ` [Qemu-devel] " Alexander Graf
2011-07-22  5:59       ` Alexander Graf
2011-07-22  6:14       ` [Qemu-devel] " Liu Yu-B13201
2011-07-22  6:14         ` Liu Yu-B13201
2011-05-19 17:35 ` [Qemu-devel] [PATCH v2 5/5] xen: mapcache performance improvements stefano.stabellini
2011-05-19 17:35   ` stefano.stabellini
2011-05-27 23:30 ` [Qemu-devel] [PATCH v2 0/5] xen mapcache fixes and improvements Alexander Graf
2011-05-27 23:30   ` Alexander Graf

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.