All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Anisov <andrii.anisov@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Andrii Anisov <andrii_anisov@epam.com>
Subject: [PATCH v2] gic: drop interrupts enabling on interrupts processing
Date: Mon, 27 May 2019 12:29:30 +0300	[thread overview]
Message-ID: <1558949370-14331-1-git-send-email-andrii.anisov@gmail.com> (raw)

From: Andrii Anisov <andrii_anisov@epam.com>

This reduces the number of context switches in case we have coming guest
interrupts from different sources at a high rate. What is likely for
multimedia use-cases.
Having irqs unlocked here makes us go through trap path again in case we
have a new guest interrupt arrived (even with the same priority, after
`desc->handler->end(desc)` in `do_IRQ()`), what is just a processor
cycles wasting. We will catch them all in the `gic_interrupt() function
loop anyway. And the guest irqs arrival prioritization is meaningless
here, it is only effective at guest's level.

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---

Changes:

    in v2: Drop irq enabling for lpi processing as well.


---
 xen/arch/arm/gic.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 6cc7dec..113655a 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -386,17 +386,13 @@ void gic_interrupt(struct cpu_user_regs *regs, int is_fiq)
 
         if ( likely(irq >= 16 && irq < 1020) )
         {
-            local_irq_enable();
             isb();
             do_IRQ(regs, irq, is_fiq);
-            local_irq_disable();
         }
         else if ( is_lpi(irq) )
         {
-            local_irq_enable();
             isb();
             gic_hw_ops->do_LPI(irq);
-            local_irq_disable();
         }
         else if ( unlikely(irq < 16) )
         {
-- 
2.7.4


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

WARNING: multiple messages have this Message-ID (diff)
From: Andrii Anisov <andrii.anisov@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Andrii Anisov <andrii_anisov@epam.com>
Subject: [Xen-devel] [PATCH v2] gic: drop interrupts enabling on interrupts processing
Date: Mon, 27 May 2019 12:29:30 +0300	[thread overview]
Message-ID: <1558949370-14331-1-git-send-email-andrii.anisov@gmail.com> (raw)
Message-ID: <20190527092930.KviQ_QX34IXUo87A94-0uDZ_MfkzT7GCQwYG5CzhqX0@z> (raw)

From: Andrii Anisov <andrii_anisov@epam.com>

This reduces the number of context switches in case we have coming guest
interrupts from different sources at a high rate. What is likely for
multimedia use-cases.
Having irqs unlocked here makes us go through trap path again in case we
have a new guest interrupt arrived (even with the same priority, after
`desc->handler->end(desc)` in `do_IRQ()`), what is just a processor
cycles wasting. We will catch them all in the `gic_interrupt() function
loop anyway. And the guest irqs arrival prioritization is meaningless
here, it is only effective at guest's level.

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---

Changes:

    in v2: Drop irq enabling for lpi processing as well.


---
 xen/arch/arm/gic.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 6cc7dec..113655a 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -386,17 +386,13 @@ void gic_interrupt(struct cpu_user_regs *regs, int is_fiq)
 
         if ( likely(irq >= 16 && irq < 1020) )
         {
-            local_irq_enable();
             isb();
             do_IRQ(regs, irq, is_fiq);
-            local_irq_disable();
         }
         else if ( is_lpi(irq) )
         {
-            local_irq_enable();
             isb();
             gic_hw_ops->do_LPI(irq);
-            local_irq_disable();
         }
         else if ( unlikely(irq < 16) )
         {
-- 
2.7.4


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

             reply	other threads:[~2019-05-27  9:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  9:29 Andrii Anisov [this message]
2019-05-27  9:29 ` [Xen-devel] [PATCH v2] gic: drop interrupts enabling on interrupts processing Andrii Anisov
2019-05-28 17:07 ` Julien Grall
2019-05-28 17:07   ` [Xen-devel] " Julien Grall
2019-05-29 10:31   ` Andrii Anisov
2019-05-29 10:31     ` [Xen-devel] " Andrii Anisov
2019-05-29 15:32     ` Julien Grall
2019-05-29 15:32       ` [Xen-devel] " Julien Grall
2019-05-30 16:12       ` Andrii Anisov
2019-05-30 16:12         ` [Xen-devel] " Andrii Anisov
2019-05-31 17:11         ` Julien Grall
2019-05-31 17:11           ` [Xen-devel] " Julien Grall
2019-05-31 20:08           ` Stefano Stabellini
2019-05-31 20:08             ` [Xen-devel] " Stefano Stabellini
2019-06-10 15:49           ` Andrii Anisov
2019-06-10 19:51             ` Julien Grall
2019-06-11  7:38               ` Andrii Anisov
2019-05-30 16:14       ` Andrii Anisov
2019-05-30 16:14         ` [Xen-devel] " Andrii Anisov
2019-05-31 17:16         ` Julien Grall
2019-05-31 17:16           ` [Xen-devel] " Julien Grall
2019-05-31 17:28           ` Andre Przywara
2019-05-31 17:28             ` [Xen-devel] " Andre Przywara
2019-05-31 17:25   ` Andre Przywara
2019-05-31 17:25     ` [Xen-devel] " Andre Przywara
2019-05-31 17:54     ` Julien Grall
2019-05-31 17:54       ` [Xen-devel] " Julien Grall

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=1558949370-14331-1-git-send-email-andrii.anisov@gmail.com \
    --to=andrii.anisov@gmail.com \
    --cc=andrii_anisov@epam.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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.