Re: [PATCH v3 1/3] wifi: iwlwifi: pcie: optimize MSI-X interrupt affinity
From: Johannes Berg
Date: Mon Mar 16 2026 - 06:33:12 EST
Hi,
Somehow you messed up reposting this - the whole v2 series appears twice
and the v3 of this patch appears twice but without the rest of the
series?
> Implement a balanced RSS queue distribution by skipping CPU0 for
> high-rate MSI-X interrupts when multiple CPUs are online. This reduces
> contention with system housekeeping tasks on the boot core and improves
> overall throughput.
*Does* it improve throughput though? You should back up such claims with
numbers ... I doubt it would (unconditionally). It's not like the system
is going to be *really busy* all the time with housekeeping etc., and
the boot core is probably going to be a P-core, where you might have a
system with only 2 P-cores and 4-8 E (or even smaller) cores. This
likely also breaks some Intel-internal system requirements, but that
could be debated with the right folks.
Either way,
> --- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c
> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c
> @@ -1683,7 +1683,17 @@ static void iwl_pcie_irq_set_affinity(struct iwl_trans *trans,
> * Get the cpu prior to the place to search
> * (i.e. return will be > i - 1).
> */
> + /*
> + * Balanced distribution: skip CPU0 for high-rate RSS queues
> + * to avoid contention with system housekeeping.
> + */
> cpu = cpumask_next(i - offset, cpu_online_mask);
> + if (cpu >= nr_cpu_ids)
> + cpu = cpumask_first(cpu_online_mask);
> +
> + if (cpu == 0 && num_online_cpus() > 1)
> + cpu = cpumask_next(0, cpu_online_mask);
> +
this is wrong since you really then should allocate one queue less,
rather than mapping two queues to the same core.
johannes