Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1433121
| From | Mark Rutland <mark.rutland@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver |
| Date | 2016-06-28 19:00 +0200 |
| Message-ID | <rP4wG-18P-5@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <rOIZb-3tG-7@gated-at.bofh.it> <rOZnk-6lK-9@gated-at.bofh.it> <rP1fs-7Cg-27@gated-at.bofh.it> <rP21P-8cR-19@gated-at.bofh.it> <rP4mZ-157-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jun 28, 2016 at 09:39:36AM -0700, Tai Tri Nguyen wrote: > Hi Mark, > > On Tue, Jun 28, 2016 at 7:14 AM, Mark Rutland <mark.rutland@arm.com> wrote: > > On Tue, Jun 28, 2016 at 02:21:38PM +0100, Marc Zyngier wrote: > >> On 28/06/16 12:13, Mark Rutland wrote: > >> > Marc, is there a sensible way to prevent irq balancers from changing the > >> > affinity of an IRQ, e.g. a kernel-side pinning mechanism, or some way we > >> > can be notified and reject changes? > >> > >> You can get notified (see irq_set_affinity_notifier), but there no way > >> to veto the change. > > > > :( > > > >> What should probably be done is to set the affinity hint > >> (irq_set_affinity_hint), and use the notifier to migrate the context > >> if possible. Note that you'll be called in process context, which will > >> race against interrupts being delivered on the new CPU. > > > > I'll have to go digging into what exactly perf_pmu_migrate_context > > requires. Given the race, I'm not sure if that's going to work. It's > > certainly not going to be self contained. > > > > That also won't work for CPU PMUs, where it makes no sense to migrate > > context or IRQs. For those we appear to already be using have > > IRQF_NOBALANCING, which sounds like exactly what we want. > > > > That appears to influence irq_can_set_affinity(), which the procfs > > helpers check. > > > > Tai, can you try requesting the IRQ with the IRQF_NOBALANCING flag? > > This seems to work. > I also tried to change smp_affinity through procfs and it returns write error. > The interrupt seems to be excluded from irq balancing. > Should I make the change? Yes please. I believe you also need IRQF_NO_THREAD per the CPU PMU drivers, so please add both flags. I'll do the same for the CCN and CCI PMU drivers. Thanks, Mark.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Tai Tri Nguyen <ttnguyen@apm.com> - 2016-06-25 20:00 +0200
Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Mark Rutland <mark.rutland@arm.com> - 2016-06-27 18:10 +0200
Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Tai Tri Nguyen <ttnguyen@apm.com> - 2016-06-27 20:00 +0200
Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Mark Rutland <mark.rutland@arm.com> - 2016-06-28 13:30 +0200
Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Marc Zyngier <marc.zyngier@arm.com> - 2016-06-28 15:30 +0200
Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Mark Rutland <mark.rutland@arm.com> - 2016-06-28 16:20 +0200
Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Tai Tri Nguyen <ttnguyen@apm.com> - 2016-06-28 18:50 +0200
Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Mark Rutland <mark.rutland@arm.com> - 2016-06-28 19:00 +0200
Re: [PATCH v4 3/4] perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver Tai Tri Nguyen <ttnguyen@apm.com> - 2016-06-28 20:10 +0200
csiph-web