Re: percpu irq APIs and perf
From: maxime.ripard@xxxxxxxxxxxxxxxxxx
Date: Mon Dec 14 2015 - 03:43:32 EST
Hi,
On Fri, Dec 11, 2015 at 05:50:22PM +0530, Vineet Gupta wrote:
> >> (2) It seems that disabling autoen by default for percpu irq makes sense as
> >> evident from drivers/net/ethernet/marvell/mvneta.c where users want to control
> >> this. However the comment there is misleading
> >>
> >> /* Even though the documentation says that request_percpu_irq
> >> * doesn't enable the interrupts automatically, it actually
> >> * does so on the local CPU.
> >> *
> >> * Make sure it's disabled.
> >> */
> >>
> >> Either sme core code is clearing NOAUTOEN or calling enable_precpu_irq() making
> >> request_percpu_irq() enable it.
> >
> > If that's the case, this is a bug. Nobody should enable that interrupt
> > until the driver has chosen to do so.
>
> Perhaps Maxim can shed more light as this seems to be his comment.
I don't really have the full context here, but we did this in order to
allow RX queue interrupts to be enabled on a particular CPU.
The IP was supposed to do that by itself, but we hadn't figure that
out at the time. So what we ended up doing is disabling the interrupts
by default and then enable it only on the CPU meant to receive the
queue interrupts.
What we found out doing so was that the per-cpu interrupts were
enabled on the cpu calling request_percpu_irq, and so that's why it
ended up with that comment.
I also fixed the documentation accordingly in a1b7febd725a.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Attachment:
signature.asc
Description: Digital signature