Re: [PATCH RFC 0/3] genirq: Allow drivers to respect userspace IRQ affinities
Florian Bezdeka <[email protected]>
| Newsgroups | dev.linux.lists.linux-rt-devel,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2026-08-20 at 02:10 +0200, Andrew Lunn wrote: > The problem with using stmmac as an example is that it is very old. It > was added to Linux in 2009. I guess most of the SoCs at that time were > single or dual core. CPU affinity was not something developers thought > about for that class of SoC. Agree, stmmac might not be the best example, but this is the "driver under test" here and it shows a pattern that is implemented in ~35 network drivers as well. Users of irq_set_affinity_hint() in 7.2, see [1], but there is lot more that needs a revisit, like irq_set_affinity_and_hint(). > > Over time the number of cores has gone up and stmmac has got faster > link speeds. But is the architecture correct? Is the driver following > best practices? This are exactly the questions that I would like to discuss. Seems we're getting closer. > > I would suggest you look at more modern MAC drivers and see how they > do CPU affinity, etc. Is there anything which can be learned from them > and implemented in stmmac? I'm still not sure if there is "the pattern" how modern drivers (btw: which drivers do you consider "modern"?) implement that. What I can tell: Most calls to irq_set_affinity_hint() (and friends) are a real problem on RT enabled systems as they simply overwrite any userspace settings. Florian [1] https://elixir.bootlin.com/linux/v7.2/A/ident/irq_set_affinity_hint