• Vineet Gupta's avatar
    ARCv2: intc: Fix random perf irq disabling in SMP setup · 8eb0984b
    Vineet Gupta authored
    As part of fixing another perf issue, observed that after a perf run,
    the interrupt got disabled on one/more cores.
    
    Turns out that despite requesting perf irq as percpu, the flow handler
    registered was not handle_percpu_irq()
    
    Given that on ARCv2 cores, IRQs < 24 are always private to cpu, we
    register the right handler at the very onset.
    
    Before Fix
    
    | [ARCLinux]# cat /proc/interrupts | grep perf
    |  20:    0      0      0       0  ARCv2 core Intc  20 ARC perf counters
    |
    | [ARCLinux]# perf record -c 20000 /sbin/hackbench
    | Running with 10*40 (== 400) tasks.
    |
    | [ARCLinux]# cat /proc/interrupts | grep perf
    |  20:    0    522      8    51916  ARCv2 core Intc  20 ARC perf counters
    |
    | [ARCLinux]# perf record -c 20000 /sbin/hackbench
    | Running with 10*40 (== 400) tasks.
    |
    | [ARCLinux]# cat /proc/interrupts | grep perf
    |  20:    0    522      8   104368  ARCv2 core Intc  20 ARC perf counters
    
    After Fix
    
    | [ARCLinux]# cat /proc/interrupts | grep perf
    |  20:    0      0      0       0  ARCv2 core Intc  20 ARC perf counters
    |
    | [ARCLinux]# perf record -c 20000 /sbin/hackbench
    | Running with 10*40 (== 400) tasks.
    |
    | [ARCLinux]# cat /proc/interrupts | grep perf
    |  20:  64198  62012  62697  67803  ARCv2 core Intc  20 ARC perf counters
    |
    | [ARCLinux]# perf record -c 20000 /sbin/hackbench
    | Running with 10*40 (== 400) tasks.
    |
    | [ARCLinux]# cat /proc/interrupts | grep perf
    |  20: 126014 122792 123301 133654  ARCv2 core Intc  20 ARC perf counters
    
    Cc: Marc Zyngier <marc.zyngier@arm.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Alexey Brodkin <abrodkin@synopsys.com>
    Cc: stable@vger.kernel.org #4.2+
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
    8eb0984b
intc-arcv2.c 4.05 KB