xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] xen: arm: map normal memory as inner shareable, reduce scope of various barriers
@ 2013-06-28 16:10 Ian Campbell
  2013-06-28 16:10 ` [PATCH 01/10] xen: arm: map memory as inner shareable Ian Campbell
                   ` (10 more replies)
  0 siblings, 11 replies; 44+ messages in thread
From: Ian Campbell @ 2013-06-28 16:10 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Stefano Stabellini, Tim Deegan

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.

^ permalink raw reply	[flat|nested] 44+ messages in thread
* (no subject)
@ 2013-07-04 11:32 Tim Deegan
  0 siblings, 0 replies; 44+ messages in thread
From: Tim Deegan @ 2013-07-04 11:32 UTC (permalink / raw)
  To: Ian Campbell; +Cc: julien.grall, stefano.stabellini, xen-devel

Bcc: Tim Deegan <tjd-xen@phlegethon.org>
Subject: Re: [Xen-devel] [PATCH 08/10] xen: arm: add scope to dsb and dmb macros
Reply-To: 
In-Reply-To: <1372435856-14040-8-git-send-email-ian.campbell@citrix.com>

At 17:10 +0100 on 28 Jun (1372439454), Ian Campbell wrote:
> Everywhere currently passes "sy"stem, so no actual change.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

Acked-by: Tim Deegan <tim@xen.org>

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

end of thread, other threads:[~2013-07-04 11:46 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-28 16:10 [PATCH 00/10] xen: arm: map normal memory as inner shareable, reduce scope of various barriers Ian Campbell
2013-06-28 16:10 ` [PATCH 01/10] xen: arm: map memory as inner shareable Ian Campbell
2013-07-01 15:39   ` Stefano Stabellini
2013-07-01 15:42     ` Ian Campbell
2013-07-02 14:09   ` Leif Lindholm
2013-07-02 14:26     ` Ian Campbell
2013-07-04 10:58   ` Tim Deegan
2013-07-04 11:03     ` Ian Campbell
2013-06-28 16:10 ` [PATCH 02/10] xen: arm: Only upgrade guest barriers to " Ian Campbell
2013-07-01 15:24   ` Stefano Stabellini
2013-07-04 10:58   ` Tim Deegan
2013-06-28 16:10 ` [PATCH 03/10] xen: arm: reduce instruction cache and tlb flushes to inner-shareable Ian Campbell
2013-07-01 15:25   ` Stefano Stabellini
2013-07-04 11:07   ` Tim Deegan
2013-07-04 11:19     ` Tim Deegan
2013-07-04 11:21       ` Tim Deegan
2013-06-28 16:10 ` [PATCH 04/10] xen: arm: consolidate barrier definitions Ian Campbell
2013-07-01 15:25   ` Stefano Stabellini
2013-07-04 11:07   ` Tim Deegan
2013-06-28 16:10 ` [PATCH 05/10] xen: use SMP barrier in common code dealing with shared memory protocols Ian Campbell
2013-06-28 16:15   ` Ian Campbell
2013-06-28 16:20   ` Keir Fraser
2013-07-04 11:26   ` Tim Deegan
2013-06-28 16:10 ` [PATCH 06/10] xen: arm: Use SMP barriers when that is all which is required Ian Campbell
2013-07-01 15:19   ` Stefano Stabellini
2013-07-01 15:24     ` Ian Campbell
2013-07-04 11:30       ` Tim Deegan
2013-06-28 16:10 ` [PATCH 07/10] xen: arm: Use dmb for smp barriers Ian Campbell
2013-07-01 15:20   ` Stefano Stabellini
2013-07-04 11:31   ` Tim Deegan
2013-06-28 16:10 ` [PATCH 08/10] xen: arm: add scope to dsb and dmb macros Ian Campbell
2013-07-01 15:21   ` Stefano Stabellini
2013-07-01 15:22     ` Stefano Stabellini
2013-07-04 11:44   ` (no subject) Tim Deegan
2013-06-28 16:10 ` [PATCH 09/10] xen: arm: weaken SMP barriers to inner shareable Ian Campbell
2013-07-01 15:21   ` Stefano Stabellini
2013-07-01 15:22     ` Stefano Stabellini
2013-07-04 11:35   ` Tim Deegan
2013-06-28 16:10 ` [PATCH 10/10] xen: arm: use more specific barriers for read and write barriers Ian Campbell
2013-07-01 15:22   ` Stefano Stabellini
2013-07-04 11:42   ` Tim Deegan
2013-07-04 11:46     ` Ian Campbell
2013-06-28 16:11 ` [PATCH 00/10] xen: arm: map normal memory as inner shareable, reduce scope of various barriers Ian Campbell
2013-07-04 11:32 (no subject) Tim Deegan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).