Re: [PATCH 1/1] ice: Change assigning method of the CPU affinity masks
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-02-08 16:59:05
Also in:
linux-crypto, linux-rdma, lkml
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-02-08 16:59:05
Also in:
linux-crypto, linux-rdma, lkml
On Wed, Feb 08, 2023 at 08:39:20AM -0800, Yury Norov wrote:
On Wed, Feb 08, 2023 at 04:39:05PM +0100, Pawel Chmielewski wrote:
...
quoted
+ v_idx = 0; + for_each_numa_hop_mask(aff_mask, numa_node) { + for_each_cpu_andnot(cpu, aff_mask, last_aff_mask) + if (v_idx < vsi->num_q_vectors) { + if (cpu_online(cpu)) + cpumask_set_cpu(cpu, &vsi->q_vectors[v_idx]->affinity_mask); + v_idx++; + }
else
goto out;In this case the inverted conditional makes more sense: if (v_idx >= vsi->num_q_vectors) goto out; if (cpu_online(cpu)) cpumask_set_cpu(cpu, &vsi->q_vectors[v_idx]->affinity_mask); v_idx++; (indentation level will be decreased).
quoted
+ last_aff_mask = aff_mask; + } +out:quoted
return 0;
-- With Best Regards, Andy Shevchenko