All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] gic-vgic optimizations
@ 2018-12-12 18:20 Andrii Anisov
  2018-12-12 18:20 ` [PATCH v2 1/2] gic-vgic: Drop an excessive clear_lrs Andrii Anisov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrii Anisov @ 2018-12-12 18:20 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Stefano Stabellini, Andrii Anisov

From: Andrii Anisov <andrii_anisov@epam.com>

Here are few patches from RFC series [1] currently approved to
be upstreamed with appropriate changes.

Andrii Anisov (2):
  gic-vgic: Drop an excessive clear_lrs
        Is a patch #5 [2], with a change:
         - Keep LR clear for debug build
        No changes in v2:


  arm/irq: skip action availability check for non-debug build
        Is a patch #11 [3], with a change:
         - Completely remove the check for a non-debug build,
           but preserve for debug.
        Changes in v2:
         - reworded the commit title and message
         - removed an RB prematurely inserted by mistake

[1] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03328.html
[2] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03285.html
[3] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03291.html

 xen/arch/arm/gic-vgic.c | 2 ++
 xen/arch/arm/irq.c      | 2 ++
 2 files changed, 4 insertions(+)

-- 
2.7.4


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

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

* [PATCH v2 1/2] gic-vgic: Drop an excessive clear_lrs
  2018-12-12 18:20 [PATCH 0/2] gic-vgic optimizations Andrii Anisov
@ 2018-12-12 18:20 ` Andrii Anisov
  2018-12-12 18:20 ` [PATCH v2 2/2] arm/irq: skip action availability check for non-debug build Andrii Anisov
  2018-12-14 15:28 ` [PATCH 0/2] gic-vgic optimizations Julien Grall
  2 siblings, 0 replies; 7+ messages in thread
From: Andrii Anisov @ 2018-12-12 18:20 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Stefano Stabellini, Andrii Anisov

From: Andrii Anisov <andrii_anisov@epam.com>

This action is excessive because for an invalid LR there is no need
to write another invalid value to a register. So we can skip it here,
saving a peripheral register write.
Keep clearing the LR for the DEBUG build. This would make dumped
invalid LRs be zero. That is more obvious than picking state bits
from a non-zero value.

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/gic-vgic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c
index 990399c..48922f5 100644
--- a/xen/arch/arm/gic-vgic.c
+++ b/xen/arch/arm/gic-vgic.c
@@ -216,7 +216,9 @@ static void gic_update_one_lr(struct vcpu *v, int i)
     }
     else
     {
+#ifndef NDEBUG
         gic_hw_ops->clear_lr(i);
+#endif
         clear_bit(i, &this_cpu(lr_mask));
 
         if ( p->desc != NULL )
-- 
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] 7+ messages in thread

* [PATCH v2 2/2] arm/irq: skip action availability check for non-debug build
  2018-12-12 18:20 [PATCH 0/2] gic-vgic optimizations Andrii Anisov
  2018-12-12 18:20 ` [PATCH v2 1/2] gic-vgic: Drop an excessive clear_lrs Andrii Anisov
@ 2018-12-12 18:20 ` Andrii Anisov
  2018-12-14 15:23   ` Julien Grall
  2018-12-14 15:28 ` [PATCH 0/2] gic-vgic optimizations Julien Grall
  2 siblings, 1 reply; 7+ messages in thread
From: Andrii Anisov @ 2018-12-12 18:20 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Stefano Stabellini, Andrii Anisov

From: Andrii Anisov <andrii_anisov@epam.com>

Under desc->lock taken:
An IRQ with _IRQ_GUEST flag set always has an action.
An IRQ with _IRQ_DISABLED flag cleared always has an action.
Those flags checks cover all accesses to desc->action in do_IRQ,
so we can skip desc->action check in non-debug build.
Keep in place for debug build to help diagnostics potential
misconfiguration.

Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---
 xen/arch/arm/irq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
index d6a0273..4a02cc1 100644
--- a/xen/arch/arm/irq.c
+++ b/xen/arch/arm/irq.c
@@ -209,12 +209,14 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, int is_fiq)
     spin_lock(&desc->lock);
     desc->handler->ack(desc);
 
+#ifndef NDEBUG
     if ( !desc->action )
     {
         printk("Unknown %s %#3.3x\n",
                is_fiq ? "FIQ" : "IRQ", irq);
         goto out;
     }
+#endif
 
     if ( test_bit(_IRQ_GUEST, &desc->status) )
     {
-- 
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] 7+ messages in thread

* Re: [PATCH v2 2/2] arm/irq: skip action availability check for non-debug build
  2018-12-12 18:20 ` [PATCH v2 2/2] arm/irq: skip action availability check for non-debug build Andrii Anisov
@ 2018-12-14 15:23   ` Julien Grall
  0 siblings, 0 replies; 7+ messages in thread
From: Julien Grall @ 2018-12-14 15:23 UTC (permalink / raw)
  To: Andrii Anisov, xen-devel; +Cc: Stefano Stabellini, Andrii Anisov

Hi Andrii,

On 12/12/18 6:20 PM, Andrii Anisov wrote:
> From: Andrii Anisov <andrii_anisov@epam.com>
> 
> Under desc->lock taken:
> An IRQ with _IRQ_GUEST flag set always has an action.
> An IRQ with _IRQ_DISABLED flag cleared always has an action.
> Those flags checks cover all accesses to desc->action in do_IRQ,
> so we can skip desc->action check in non-debug build.
> Keep in place for debug build to help diagnostics potential
> misconfiguration.
> 
> Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

> ---
>   xen/arch/arm/irq.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
> index d6a0273..4a02cc1 100644
> --- a/xen/arch/arm/irq.c
> +++ b/xen/arch/arm/irq.c
> @@ -209,12 +209,14 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, int is_fiq)
>       spin_lock(&desc->lock);
>       desc->handler->ack(desc);
>   
> +#ifndef NDEBUG
>       if ( !desc->action )
>       {
>           printk("Unknown %s %#3.3x\n",
>                  is_fiq ? "FIQ" : "IRQ", irq);
>           goto out;
>       }
> +#endif
>   
>       if ( test_bit(_IRQ_GUEST, &desc->status) )
>       {
> 

-- 
Julien Grall

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

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

* Re: [PATCH 0/2] gic-vgic optimizations
  2018-12-12 18:20 [PATCH 0/2] gic-vgic optimizations Andrii Anisov
  2018-12-12 18:20 ` [PATCH v2 1/2] gic-vgic: Drop an excessive clear_lrs Andrii Anisov
  2018-12-12 18:20 ` [PATCH v2 2/2] arm/irq: skip action availability check for non-debug build Andrii Anisov
@ 2018-12-14 15:28 ` Julien Grall
  2018-12-14 15:38   ` Andrii Anisov
  2 siblings, 1 reply; 7+ messages in thread
From: Julien Grall @ 2018-12-14 15:28 UTC (permalink / raw)
  To: Andrii Anisov, xen-devel; +Cc: Stefano Stabellini, Andrii Anisov

Hi,

I have committed the 2 patches.

In the future, please add the version of the series in the title of the 
cover letter. This makes easier for us to know which series is the latest.

This could be done automatically if you use git-format-patch to generate 
the cover letter at the same time as the patches.

Cheers,

On 12/12/18 6:20 PM, Andrii Anisov wrote:
> From: Andrii Anisov <andrii_anisov@epam.com>
> 
> Here are few patches from RFC series [1] currently approved to
> be upstreamed with appropriate changes.
> 
> Andrii Anisov (2):
>    gic-vgic: Drop an excessive clear_lrs
>          Is a patch #5 [2], with a change:
>           - Keep LR clear for debug build
>          No changes in v2:
> 
> 
>    arm/irq: skip action availability check for non-debug build
>          Is a patch #11 [3], with a change:
>           - Completely remove the check for a non-debug build,
>             but preserve for debug.
>          Changes in v2:
>           - reworded the commit title and message
>           - removed an RB prematurely inserted by mistake
> 
> [1] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03328.html
> [2] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03285.html
> [3] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03291.html
> 
>   xen/arch/arm/gic-vgic.c | 2 ++
>   xen/arch/arm/irq.c      | 2 ++
>   2 files changed, 4 insertions(+)
> 

-- 
Julien Grall

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

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

* Re: [PATCH 0/2] gic-vgic optimizations
  2018-12-14 15:28 ` [PATCH 0/2] gic-vgic optimizations Julien Grall
@ 2018-12-14 15:38   ` Andrii Anisov
  0 siblings, 0 replies; 7+ messages in thread
From: Andrii Anisov @ 2018-12-14 15:38 UTC (permalink / raw)
  To: Julien Grall; +Cc: xen-devel, Stefano Stabellini, Andrii Anisov

Hello Julien,

On 14.12.18 17:28, Julien Grall wrote:
> This could be done automatically if you use git-format-patch to generate the cover letter at the same time as the patches.
It was done automatically by git-format-patch. But was overwritten by cover letter content copy-paste from the first version.
I noticed that when received the series back from the list.
Sorry for the mess.

-- 
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] 7+ messages in thread

* [PATCH 0/2] gic-vgic optimizations
@ 2018-12-12 16:55 Andrii Anisov
  0 siblings, 0 replies; 7+ messages in thread
From: Andrii Anisov @ 2018-12-12 16:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Stefano Stabellini, Andrii Anisov

From: Andrii Anisov <andrii_anisov@epam.com>

Here are few patches from RFC series [1] currently approved to
be upstreamed with appropriate changes.

Andrii Anisov (2):
  gic-vgic: Drop an excessive clear_lrs
        Is a patch #5 [2], with a change:
         - Keep LR clear for debug build

  arm/irq: skip action availability check for non-debug build
        Is a patch #11 [3], with a change:
         - Completely remove the check for a non-debug build,
           but preserve for debug.

[1] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03328.html
[2] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03285.html
[3] https://lists.xenproject.org/archives/html/xen-devel/2018-11/msg03291.html


 xen/arch/arm/gic-vgic.c | 2 ++
 xen/arch/arm/irq.c      | 2 ++
 2 files changed, 4 insertions(+)

-- 
2.7.4


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

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

end of thread, other threads:[~2018-12-14 15:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-12 18:20 [PATCH 0/2] gic-vgic optimizations Andrii Anisov
2018-12-12 18:20 ` [PATCH v2 1/2] gic-vgic: Drop an excessive clear_lrs Andrii Anisov
2018-12-12 18:20 ` [PATCH v2 2/2] arm/irq: skip action availability check for non-debug build Andrii Anisov
2018-12-14 15:23   ` Julien Grall
2018-12-14 15:28 ` [PATCH 0/2] gic-vgic optimizations Julien Grall
2018-12-14 15:38   ` Andrii Anisov
  -- strict thread matches above, loose matches on Subject: below --
2018-12-12 16:55 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.