Thread (35 messages) 35 messages, 10 authors, 2023-02-20

Re: [PATCH v2 1/1] ice: Change assigning method of the CPU affinity masks

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-02-16 15:17:28
Also in: linux-crypto, linux-rdma, lkml

On Thu, Feb 16, 2023 at 03:54:55PM +0100, Pawel Chmielewski wrote:
With the introduction of sched_numa_hop_mask() and for_each_numa_hop_mask(),
the affinity masks for queue vectors can be conveniently set by preferring the
CPUs that are closest to the NUMA node of the parent PCI device.
...
+	v_idx = 0;
+
Redundant blank line.
+	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)
+				goto out;
Useless. You can return 0; here.
+			if (cpu_online(cpu)) {
+				cpumask_set_cpu(cpu, &vsi->q_vectors[v_idx]->affinity_mask);
+				v_idx++;
+			}
+		}
+
+		last_aff_mask = aff_mask;
+	}
+
+out:
 	return 0;
-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help