From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH 2/5] genirq: Allow the affinity of a percpu interrupt to be set/retrieved Date: Thu, 19 May 2016 15:25:16 +0200 Message-ID: References: <1460365075-7316-1-git-send-email-marc.zyngier@arm.com> <1460365075-7316-3-git-send-email-marc.zyngier@arm.com> <573DBBFA.8020903@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <573DBBFA.8020903-5wv7dgnIgG8@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Marc Zyngier Cc: Thomas Gleixner , Jiang Liu , Jason Cooper , Will Deacon , Mark Rutland , Rob Herring , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: devicetree@vger.kernel.org Hi Marc, On Thu, May 19, 2016 at 3:13 PM, Marc Zyngier wrote: > On 19/05/16 12:08, Geert Uytterhoeven wrote: >> On Mon, Apr 11, 2016 at 10:57 AM, Marc Zyngier wrote: >>> In order to prepare the genirq layer for the concept of partitionned >>> percpu interrupts, let's allow an affinity to be associated with >>> such an interrupt. We introduce: >>> >>> - irq_set_percpu_devid_partition: flag an interrupt as a percpu-devid >>> interrupt, and associate it with an affinity >>> - irq_get_percpu_devid_partition: allow the affinity of that interrupt >>> to be retrieved. >>> >>> This will allow a driver to discover which CPUs the per-cpu interrupt >>> can actually fire on. >>> >>> Signed-off-by: Marc Zyngier >> >>> --- a/include/linux/irqdesc.h >>> +++ b/include/linux/irqdesc.h >>> @@ -66,6 +66,7 @@ struct irq_desc { >>> int threads_handled_last; >>> raw_spinlock_t lock; >>> struct cpumask *percpu_enabled; >>> + const struct cpumask *percpu_affinity; >> >> Adding this field showed up on my bloat-o-meter radar... > > By how much? By NR_IRQS * 4 bytes, which ranges from 32 to 1024 bytes on m68k, depending on the platform. >> Does it make sense to move it (and percpu_enabled) inside the "#ifdef >> CONFIG_SMP" below, and rework the code to not need it on UP? >> >>> #ifdef CONFIG_SMP >>> const struct cpumask *affinity_hint; >>> struct irq_affinity_notify *affinity_notify; > > I wonder if we couldn't actually unify affinity_hint and > percpu_affinity. I'll have a look. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html