Skip to contentSkip to conversation

xen: arm: perfc: count individual SGIs and PPIs

PATCH In review Ian Campbell 3 participants 5 messages Nov 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: arm: perfc: count individual SGIs and PPIs

SPIs are too numerous and not indivcidually as interesting.

Make the exists #IPIS counter x86 specific.

---
 xen/arch/arm/gic.c               | 2 +-
 xen/arch/arm/irq.c               | 4 ++--
 xen/include/asm-arm/perfc_defn.h | 3 ++-
 xen/include/asm-x86/perfc_defn.h | 1 +
 xen/include/xen/perfc_defn.h     | 1 -
 5 files changed, 6 insertions(+), 5 deletions(-)
xen/arch/arm/gic.c +1 -1
index 1e1e5ba..b0b0999 100644
@@ -609,7 +609,7 @@ static void do_sgi(struct cpu_user_regs *regs, enum gic_sgi sgi)
     /* Lower the priority */
     struct irq_desc *desc = irq_to_desc(sgi);
 
-    perfc_incr(ipis);
+    perfc_incra(sgis, sgi);
 
     /* Lower the priority */
     gic_hw_ops->eoi_irq(desc);
xen/arch/arm/irq.c +2 -2
index 1f38605..5031777 100644
@@ -192,8 +192,8 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, int is_fiq)
 
     ASSERT(irq >= 16); /* SGIs do not come down this path */
 
-    if (irq < 32)
-        perfc_incr(ppis);
+    if ( irq < 32 )
+        perfc_incra(ppis, irq - 16);
     else
         perfc_incr(spis);
 
xen/include/asm-arm/perfc_defn.h +2 -1
index 69fabe7..3e21590 100644
@@ -62,7 +62,8 @@ PERFCOUNTER(vtimer_phys_inject,   "vtimer: phys expired, injected")
 PERFCOUNTER(vtimer_phys_masked,   "vtimer: phys expired, masked")
 PERFCOUNTER(vtimer_virt_inject,   "vtimer: virt expired, injected")
 
-PERFCOUNTER(ppis,                 "#PPIs")
+PERFCOUNTER_ARRAY(sgis,           "#SGIs", 16)
+PERFCOUNTER_ARRAY(ppis,           "#PPIs", 16)
 PERFCOUNTER(spis,                 "#SPIs")
 PERFCOUNTER(guest_irqs,           "#GUEST-IRQS")
 
xen/include/asm-x86/perfc_defn.h +1 -0
index 9ef092e..c96a3f0 100644
@@ -3,6 +3,7 @@
 /*#define __XEN_PERFC_DEFN_H__*/
 
 PERFCOUNTER_ARRAY(exceptions,           "exceptions", 32)
+PERFCOUNTER(ipis,                       "#IPIs")
 
 #define VMX_PERF_EXIT_REASON_SIZE 56
 #define VMX_PERF_VECTOR_SIZE 0x20
xen/include/xen/perfc_defn.h +0 -1
index 034c7d3..2b39fa9 100644
@@ -10,7 +10,6 @@ PERFCOUNTER(calls_to_multicall,         "calls to multicall")
 PERFCOUNTER(calls_from_multicall,       "calls from multicall")
 
 PERFCOUNTER(irqs,                   "#interrupts")
-PERFCOUNTER(ipis,                   "#IPIs")
 
 /* Generic scheduler counters (applicable to all schedulers) */
 PERFCOUNTER(sched_irq,              "sched: timer")
Signature · 1 line
2.1.4
#1 lore raw
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 09.11.15 at 15:01, <[email protected]> wrote:

SPIs are too numerous and not indivcidually as interesting.

Make the exists #IPIS counter x86 specific.

I'd recommend not to - even if ARM doesn't want to use it, it's still a pretty generic thing.

Jan

#2 lore raw
Quoted 7 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 09.11.15 at 15:01, <[email protected]> wrote:

SPIs are too numerous and not indivcidually as interesting.

Make the exists #IPIS counter x86 specific.

I'd recommend not to - even if ARM doesn't want to use it, it's still a pretty generic thing.

ARM calls these "SGIs" (Software Generated Is), but I suppose I don't mind keeping the #IPIS around and generic though.

Ian.

#3 lore raw

Hi,

Quoted 11 lines · Ian Campbell
Quoted 7 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 09.11.15 at 15:01, <[email protected]> wrote:

SPIs are too numerous and not indivcidually as interesting.

Make the exists #IPIS counter x86 specific.

I'd recommend not to - even if ARM doesn't want to use it, it's still a pretty generic thing.

ARM calls these "SGIs" (Software Generated Is), but I suppose I don't mind keeping the #IPIS around and generic though.

With this patch the only usage of #IPIS is in arch/x86. It will confuse the user because #IPIs will always be 0 on ARM.

So I don't see any point to keep the definition common.

Regards,

Signature · 1 line
Julien Grall
#4 lore raw
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 09.11.15 at 15:24, <[email protected]> wrote:
Quoted 6 lines · Ian Campbell
Quoted 5 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 09.11.15 at 15:01, <[email protected]> wrote:

SPIs are too numerous and not indivcidually as interesting.

Make the exists #IPIS counter x86 specific.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I'd recommend not to - even if ARM doesn't want to use it, it's still a pretty generic thing.

ARM calls these "SGIs" (Software Generated Is), but I suppose I don't mind keeping the #IPIS around and generic though.

With this patch the only usage of #IPIS is in arch/x86. It will confuse the user because #IPIs will always be 0 on ARM.

There are quite a few counters which will (perhaps under some conditions) remain to be zero.

Quoted 1 line

So I don't see any point to keep the definition common.

I think "IPI" is a generic enough concept (and afaia not one introduced through x86, not even just its name) to allow for possible future ports to use this.

Jan