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

[Xen-devel] [PATCH 00/10] xen: arm: map normal memory as inner shareable, reduce scope of various barriers



Currently Xen maps all RAM as Outer-Shareable, since that seemed like
the most conservative option early on when we didn't really know what
Inner- vs. Outer-Shareable meant. However we have long suspected that
actually Inner-Shareable would be the correct type to use.

After reading the docs many times, getting more confused each time, I
finally got a reasonable explanation from a man (and a dog) down the
pub: Inner-Shareable == the processors in an SMP system, while
Outer-Shareable == devices. (NB: Not a random man, he knew what he was
talking about...). With that in mind switch all of Xen's memory mapping,
page table walks, TLB flushes and an appropriate subset of the barriers
to be inner shareable.

In addition I have switched barriers to use the correct read/write/any
variants for their types. Note that I have only tackled the generic
mb/rmb/wmb and smp_* barriers (mainly used by common code) here. There
are also quite a few open-coded full-system dsb's in the arch code which
I will look at separately (10 patches is quite enough for now). Since
those deal with e.g. pagetable updates they will be fun ;-)

I have tested this series on Cortex A15 and AEMv8 fast models in both
cases with 2 CPUs and I can start a guest in both cases. I have not
tested on any real hardware at all.

These changes should result in a performance improvement, although only
having models to go on I haven't actually bothered to measure.

I would appreciate anyone with access to real hardware giving it a go. I
have pushed the patches to:

        git://xenbits.xen.org/people/ianc/xen.git inner-shareable-v1
        
        
Ian Campbell (10):
      xen: arm: map memory as inner shareable.
      xen: arm: Only upgrade guest barriers to inner shareable.
      xen: arm: reduce instruction cache and tlb flushes to inner-shareable.
      xen: arm: consolidate barrier definitions
      xen: use SMP barrier in common code dealing with shared memory protocols
      xen: arm: Use SMP barriers when that is all which is required.
      xen: arm: Use dmb for smp barriers
      xen: arm: add scope to dsb and dmb macros
      xen: arm: weaken SMP barriers to inner shareable.
      xen: arm: use more specific barriers for read and write barriers.

 xen/arch/arm/arm32/head.S            |    8 +++---
 xen/arch/arm/arm64/head.S            |    8 +++---
 xen/arch/arm/domain.c                |    2 +-
 xen/arch/arm/gic.c                   |    8 +++---
 xen/arch/arm/mm.c                    |   28 ++++++++++------------
 xen/arch/arm/platforms/vexpress.c    |    6 ++--
 xen/arch/arm/smpboot.c               |    6 ++--
 xen/arch/arm/time.c                  |    2 +-
 xen/arch/arm/traps.c                 |    2 +-
 xen/common/domain.c                  |    2 +-
 xen/common/domctl.c                  |    2 +-
 xen/common/grant_table.c             |    4 +-
 xen/common/page_alloc.c              |    2 +-
 xen/common/smp.c                     |    4 +-
 xen/common/spinlock.c                |    6 ++--
 xen/common/tmem_xen.c                |   10 ++++----
 xen/common/trace.c                   |    8 +++---
 xen/drivers/char/console.c           |    2 +-
 xen/drivers/video/arm_hdlcd.c        |    2 +-
 xen/include/asm-arm/arm32/flushtlb.h |   12 +++++-----
 xen/include/asm-arm/arm32/io.h       |    4 +-
 xen/include/asm-arm/arm32/page.h     |   12 +++++-----
 xen/include/asm-arm/arm32/system.h   |   16 -------------
 xen/include/asm-arm/arm64/flushtlb.h |    4 +-
 xen/include/asm-arm/arm64/io.h       |    4 +-
 xen/include/asm-arm/arm64/page.h     |   10 ++++----
 xen/include/asm-arm/arm64/system.h   |   17 -------------
 xen/include/asm-arm/page.h           |   42 +++++++++++++++++++++++++++++-----
 xen/include/asm-arm/system.h         |   21 +++++++++++++++++
 xen/include/xen/event.h              |    4 +-
 xen/xsm/flask/ss/sidtab.c            |    4 +-
 31 files changed, 139 insertions(+), 123 deletions(-)

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.