lkml.org 
[lkml]   [2023]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/3] net: mana: add a function to spread IRQs per CPUs
From


On 12/17/2023 1:32 PM, Yury Norov wrote:
> +static __maybe_unused int irq_setup(unsigned int *irqs, unsigned int len, int node)
> +{
> + const struct cpumask *next, *prev = cpu_none_mask;
> + cpumask_var_t cpus __free(free_cpumask_var);
> + int cpu, weight;
> +
> + if (!alloc_cpumask_var(&cpus, GFP_KERNEL))
> + return -ENOMEM;
> +
> + rcu_read_lock();
> + for_each_numa_hop_mask(next, node) {
> + weight = cpumask_weight_andnot(next, prev);
> + while (weight-- > 0) {
> + cpumask_andnot(cpus, next, prev);
> + for_each_cpu(cpu, cpus) {
> + if (len-- == 0)
> + goto done;
> + irq_set_affinity_and_hint(*irqs++, topology_sibling_cpumask(cpu));
> + cpumask_andnot(cpus, cpus, topology_sibling_cpumask(cpu));
> + }
> + }
> + prev = next;
> + }
> +done:
> + rcu_read_unlock();
> + return 0;
> +}
> +

You're adding a function here but its not called and even marked as
__maybe_unused?

> static int mana_gd_setup_irqs(struct pci_dev *pdev)
> {
> unsigned int max_queues_per_port = num_online_cpus();

\
 
 \ /
  Last update: 2023-12-18 22:19    [W:0.061 / U:1.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site