All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gic: drop interrupts enabling on interrupts processing
@ 2018-12-21 17:41 Andrii Anisov
  2019-01-21 17:39 ` Julien Grall
  0 siblings, 1 reply; 3+ messages in thread
From: Andrii Anisov @ 2018-12-21 17:41 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Stefano Stabellini, Andrii Anisov

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>

---

This is the patch [1] from RFC series, with extended commit message.

[1] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03286.html

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

diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 6cc7dec..9f5cd95 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -386,10 +386,8 @@ 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) )
         {
-- 
2.7.4


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

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

* Re: [PATCH] gic: drop interrupts enabling on interrupts processing
  2018-12-21 17:41 [PATCH] gic: drop interrupts enabling on interrupts processing Andrii Anisov
@ 2019-01-21 17:39 ` Julien Grall
  2019-01-22 13:12   ` Andrii Anisov
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2019-01-21 17:39 UTC (permalink / raw)
  To: Andrii Anisov, xen-devel; +Cc: Stefano Stabellini, Andrii Anisov

Hi,

On 21/12/2018 17:41, Andrii Anisov wrote:
> 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>
> 
> ---
> 
> This is the patch [1] from RFC series, with extended commit message.
> 
> [1] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03286.html
> 
> ---
>   xen/arch/arm/gic.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
> index 6cc7dec..9f5cd95 100644
> --- a/xen/arch/arm/gic.c
> +++ b/xen/arch/arm/gic.c
> @@ -386,10 +386,8 @@ 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) )
>           {

I think it would make sense to keep the interrupts disabled in is_lpi as well. 
So we keep the behavior the same accross all interrupts.

Cheers,

-- 
Julien Grall

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

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

* Re: [PATCH] gic: drop interrupts enabling on interrupts processing
  2019-01-21 17:39 ` Julien Grall
@ 2019-01-22 13:12   ` Andrii Anisov
  0 siblings, 0 replies; 3+ messages in thread
From: Andrii Anisov @ 2019-01-22 13:12 UTC (permalink / raw)
  To: Julien Grall, xen-devel; +Cc: Stefano Stabellini, Andrii Anisov

Hello Julien,

On 21.01.19 19:39, Julien Grall wrote:
> I think it would make sense to keep the interrupts disabled in is_lpi as well. So we keep the behavior the same accross all interrupts.
Agree.
Will send v2 a bit later.

-- 
Sincerely,
Andrii Anisov.

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

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

end of thread, other threads:[~2019-01-22 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-21 17:41 [PATCH] gic: drop interrupts enabling on interrupts processing Andrii Anisov
2019-01-21 17:39 ` Julien Grall
2019-01-22 13:12   ` Andrii Anisov

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.