linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm-cc*: ensure perf synchronisation
@ 2016-06-28 17:50 Mark Rutland
  2016-06-28 17:50 ` [PATCH 1/2] arm-ccn: " Mark Rutland
  2016-06-28 17:50 ` [PATCH 2/2] arm-cci: " Mark Rutland
  0 siblings, 2 replies; 9+ messages in thread
From: Mark Rutland @ 2016-06-28 17:50 UTC (permalink / raw)
  To: linux-arm-kernel

As discovered during review of the X-Gene SoC PMU [1], the arm-cc{i,n} drivers
don't ensure that IRQ balancers don't migrate interrupts.

This is problematic for the perf core code, which requires mutual exclusion of
certain operations (e.g. event rotation, cross-calls, and irq handling) to be
provided by disabling IRQs, which only works if all operations occur on the
same CPU. This is also required for safe (lockless) manipulation of some data
structures.

To avoid this problem, we must request interrupts with IRQF_NOBALANCING, as is
already the case for CPU PMU drivers which make use of interrupts.

To ensure synchronisation between IRQ handlers and other manipulation of said
data structures or HW state, we must also ensure that the interrupt handlers
are not threaded, by requesting them with IRQF_NO_THREAD, as is already the
case for CPU PMU drivers.

Thanks,
Mark.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2016-June/439589.html

Mark Rutland (2):
  arm-ccn: ensure perf synchronisation
  arm-cci: ensure perf synchronisation

 drivers/bus/arm-cci.c | 3 ++-
 drivers/bus/arm-ccn.c | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2016-07-04 13:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-28 17:50 [PATCH 0/2] arm-cc*: ensure perf synchronisation Mark Rutland
2016-06-28 17:50 ` [PATCH 1/2] arm-ccn: " Mark Rutland
2016-07-04 13:39   ` Pawel Moll
2016-07-04 13:50     ` Mark Rutland
2016-06-28 17:50 ` [PATCH 2/2] arm-cci: " Mark Rutland
2016-07-04 10:22   ` Will Deacon
2016-07-04 10:31     ` Mark Rutland
2016-07-04 10:44       ` Mark Rutland
2016-07-04 11:16       ` Punit Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).