Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290977

Re: percpu irq APIs and perf

From "maxime.ripard@free-electrons.com" <maxime.ripard@free-electrons.com>
Newsgroups linux.kernel
Subject Re: percpu irq APIs and perf
Date 2015-12-14 09:50 +0100
Message-ID <qFwZs-3HK-19@gated-at.bofh.it> (permalink)
References <qE5HZ-4fH-31@gated-at.bofh.it> <qE6kG-4M5-21@gated-at.bofh.it> <qEorh-8dZ-19@gated-at.bofh.it> <qEu3F-3z9-43@gated-at.bofh.it> <qEuZI-4cP-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: percpu irq APIs and perf "maxime.ripard@free-electrons.com" <maxime.ripard@free-electrons.com> - 2015-12-14 09:50 +0100

csiph-web