All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Andrii Anisov <Andrii_Anisov@epam.com>
Cc: Andrii Anisov <andrii.anisov@gmail.com>,
	"julien.grall@arm.com" <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [RFC 00/16] Old GIC (gic-vgic) optimizations for GICV2
Date: Thu, 29 Nov 2018 12:07:20 +0000	[thread overview]
Message-ID: <20181129120649.5b0ebdee@donnerap.cambridge.arm.com> (raw)
In-Reply-To: <AM6PR03MB49190806B62E1E4A883096C3E6D20@AM6PR03MB4919.eurprd03.prod.outlook.com>

On Thu, 29 Nov 2018 07:40:00 +0000
Andrii Anisov <Andrii_Anisov@epam.com> wrote:

> Hello,
> 
> Again, I sent this cover letter only to myself. So, here it is, hope
> it does not break the thread. Sorry for the mess.
> 
> 
> From: Andrii Anisov <andrii.anisov@gmail.com>
> Sent: Wednesday, November 28, 2018 11:31 PM
> Cc: Andrii Anisov
> Subject: [RFC 00/16] Old GIC (gic-vgic) optimizations for GICV2
>   
> 
> From: Andrii Anisov <andrii_anisov@epam.com>
> 
> This patch series is an attempt to reduce IRQ latency with the
> old GIC implementation (gic-vgic). These patches originally based
> on XEN 4.10 release. The motivation was to improve benchmark
> results of a system given to a customer for evaluation.

Have you tried the new VGIC? I am curious if you see a performance drop
compared to the old VGIC. It *should* be faster in the common case of
no (or maybe one) pending interrupts, because it doesn't bother to
touch LRs at all.

> This patch series is tailored for GICv2 on RCAR H3. Several
> of the most controversial patches (i.e. LRs shadowing) were
> not shared to the customer, and here are for comments and discussion.
> I hope several patches from here could be upstreamed. Some as is,
> others with modifications.
> 
> There are several simple ideas behind these changes:
>     - reduce an excessive code (condition checks)
>     - drop an excessive peripheral register accesses
>     - if not reduce, then move an excessive code out of spinlocks
>     - if not drop, then move an excessive register
>       accesses out of spinlocks

So some of the patches contain some good ideas, but as Julien said: we
would need some numbers to prove that they are worth it.

Cheers,
Andre.
 
> With porting existing patches, I've got another idea that accessing
> PER_CPU variables like `current` and `lr_mask` is not really cheap.
> So it should produce faster code keeping `lr_mask` solely in
> `struct vcpu` and pass `current` as a function parameter instead
> of calculation it each time in called functions.
> 
> Andrii Anisov (15):
>   hack: drop GIC v3 support
>   vgic: move pause_flags check out of vgic spinlock
>   vgic: move irq_to_pending out of lock
>   gic-vgic: Drop an excessive clear_lrs
>   gic: drop interrupts enabling on interrupts processing
>   gic-vgic:vgic: do not keep disabled IRQs in any of queues
>   gic: separate ppi processing
>   gic-vgic:vgic: avoid excessive conversions
>   gic:vgic:gic-vgic: introduce non-atomic bitops
>   irq: skip action avalability check for guest's IRQ
>   gic-v2: Write HCR only on change
>   gic-vgic: skip irqs locking
>   hack: arm/domain: simplify context restore from idle vcpu
>   hack: move gicv2 LRs reads and writes out of spinlocks
>   gic: vgic: align frequently accessed data by cache line size
> 
> Julien Grall (1):
>   xen/arm: Re-enable interrupt later in the trap path
> 
>  xen/arch/arm/arm64/entry.S           | 11 ++---
>  xen/arch/arm/configs/arm64_defconfig |  1 +
>  xen/arch/arm/domain.c                | 25 ++++++----
>  xen/arch/arm/gic-v2.c                | 63 ++++++++++++++++--------
>  xen/arch/arm/gic-v3-lpi.c            |  2 +
>  xen/arch/arm/gic-v3.c                |  2 +
>  xen/arch/arm/gic-vgic.c              | 84
> +++++++++++++++++++------------- xen/arch/arm/gic.c
> | 32 +++++++++++-- xen/arch/arm/irq.c                   | 46
> +++++++++++++++--- xen/arch/arm/traps.c                 |  6 +++
>  xen/arch/arm/vgic-v3-its.c           |  3 +-
>  xen/arch/arm/vgic.c                  | 93
> ++++++++++++++++++++++++++++++------
> xen/arch/arm/vgic/vgic.c             |  2 +
> xen/include/asm-arm/config.h         |  2 +-
> xen/include/asm-arm/gic.h            | 10 ++--
> xen/include/asm-arm/irq.h            |  3 ++
> xen/include/asm-arm/vgic.h           | 24 ++++++----
> xen/include/xen/sched.h              |  1 + 18 files changed, 299
> insertions(+), 111 deletions(-)
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      parent reply	other threads:[~2018-11-29 12:07 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1543440731-21947-1-git-send-email-andrii.anisov@gmail.com>
2018-11-28 21:31 ` [RFC 01/16] xen/arm: Re-enable interrupt later in the trap path Andrii Anisov
2018-11-28 22:00   ` Julien Grall
2019-07-30 17:34     ` [Xen-devel] " Andrii Anisov
2019-07-30 20:46       ` Julien Grall
2018-11-28 21:31 ` [RFC 02/16] hack: drop GIC v3 support Andrii Anisov
2018-11-29 12:08   ` Andre Przywara
2018-11-28 21:31 ` [RFC 03/16] vgic: move pause_flags check out of vgic spinlock Andrii Anisov
2018-11-28 22:02   ` Julien Grall
2018-11-28 21:31 ` [RFC 04/16] vgic: move irq_to_pending out of lock Andrii Anisov
2018-11-29 11:07   ` Julien Grall
2018-11-28 21:32 ` [RFC 05/16] gic-vgic: Drop an excessive clear_lrs Andrii Anisov
2018-12-11 14:33   ` Julien Grall
2018-12-12 11:01     ` Andrii Anisov
2018-12-12 11:55       ` Julien Grall
2018-11-28 21:32 ` [RFC 06/16] gic: drop interrupts enabling on interrupts processing Andrii Anisov
2018-11-28 22:06   ` Julien Grall
2018-12-12 12:10     ` Julien Grall
2018-11-28 21:32 ` [RFC 07/16] gic-vgic:vgic: do not keep disabled IRQs in any of queues Andrii Anisov
2018-11-28 21:32 ` [RFC 08/16] gic: separate ppi processing Andrii Anisov
2018-12-12 12:37   ` Andrii Anisov
2018-12-12 12:46     ` Julien Grall
2018-12-12 12:52       ` Andrii Anisov
2018-12-12 13:46         ` Julien Grall
2018-11-28 21:32 ` [RFC 09/16] gic-vgic:vgic: avoid excessive conversions Andrii Anisov
2018-11-29 10:23   ` Julien Grall
2018-11-28 21:32 ` [RFC 10/16] gic:vgic:gic-vgic: introduce non-atomic bitops Andrii Anisov
2018-11-29 12:14   ` Andre Przywara
2018-11-29 16:07     ` Julien Grall
2018-12-03 12:33     ` Andrii Anisov
2018-12-03 12:58       ` Julien Grall
2018-12-03 13:05         ` Andrii Anisov
2018-12-03 13:08           ` Julien Grall
2018-12-03 16:37       ` Andre Przywara
2018-11-28 21:32 ` [RFC 11/16] irq: skip action avalability check for guest's IRQ Andrii Anisov
2018-12-11 14:48   ` Julien Grall
2018-12-12 11:30     ` Andrii Anisov
2018-12-12 11:59       ` Julien Grall
2018-12-12 13:51         ` Andrii Anisov
2018-12-12 14:49           ` Julien Grall
2018-12-12 14:58             ` Andrii Anisov
2018-12-12 15:08               ` Julien Grall
2018-12-12 15:57                 ` Andrii Anisov
2018-11-28 21:32 ` [RFC 12/16] gic-v2: Write HCR only on change Andrii Anisov
2018-11-29 16:36   ` Julien Grall
2018-11-28 21:32 ` [RFC 13/16] gic-vgic: skip irqs locking Andrii Anisov
2018-12-12 12:07   ` Julien Grall
2018-12-12 12:35     ` Andrii Anisov
2018-12-12 12:44       ` Julien Grall
2018-12-12 12:47         ` Andrii Anisov
2018-11-28 21:32 ` [RFC 14/16] hack: arm/domain: simplify context restore from idle vcpu Andrii Anisov
2018-11-29 15:53   ` Julien Grall
2018-11-29 16:00   ` Wei Liu
2018-11-28 21:32 ` [RFC 15/16] hack: move gicv2 LRs reads and writes out of spinlocks Andrii Anisov
2018-11-28 21:58   ` Julien Grall
2018-11-28 21:32 ` [RFC 16/16] gic: vgic: align frequently accessed data by cache line size Andrii Anisov
2018-11-29 16:24   ` Julien Grall
2018-11-29  7:40 ` [RFC 00/16] Old GIC (gic-vgic) optimizations for GICV2 Andrii Anisov
2018-11-29 11:00   ` Julien Grall
2018-11-29 12:07   ` Andre Przywara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181129120649.5b0ebdee@donnerap.cambridge.arm.com \
    --to=andre.przywara@arm.com \
    --cc=Andrii_Anisov@epam.com \
    --cc=andrii.anisov@gmail.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.