Re: [PATCH RFC 1/3] cpumask: Honor irq_default_affinity in cpumask_local_spread()
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 18:09 +0200, Sebastian Andrzej Siewior wrote: > On 2026-08-19 14:38:22 [-0400], Yury Norov wrote: > > > --- a/lib/cpumask.c > > > +++ b/lib/cpumask.c > > > @@ -81,8 +82,9 @@ void __init free_bootmem_cpumask_var(cpumask_var_t mask) > > > * @i: index number > > > * @node: local numa_node > > > * > > > - * Return: online CPU according to a numa aware policy; local cpus are returned > > > - * first, followed by non-local ones, then it wraps around. > > > + * Return: online CPU according to the default IRQ affinity and a numa aware > > > + * policy; local cpus are returned first, followed by non-local ones, then it > > > + * wraps around. > > > * > > > * For those who wants to enumerate all CPUs based on their NUMA distances, > > > * i.e. call this function in a loop, like: > > > @@ -110,9 +112,9 @@ unsigned int cpumask_local_spread(unsigned int i, int node) > > > > Please don't touch this function. There's ~40 users, and we don't want > > to inspect every caller for their intention. > > While this might be okay for the NICs, the usage of PMUs shouldn't be > changed. So yes, Yury's suggestion to create your own function and then > move the drivers one by one makes sense. > You might also want to verify that your setup/ design works on some > "newer" multi queue NICs even after the number of queues is reconfigured > at runtime. > > There is also netif_set_affinity_auto(). > Thanks for this pointer. 4 users and yet another implementation that ignores the current userspace settings... I'll put this on my "to be revisited" list. Thanks!