Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ibmvnic: Update XPS assignments during affinity binding

Transmit Packet Steering (XPS) maps cpu numbers to transmit
queues. By running the same connection on the same set of cpu's,
contention for the queue and cache miss rate can be minimized.
When assigning a cpu mask for a tranmit queues irq number, assign
the same cpu mask as the set of cpu's that XPS should use for that
queue.

Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: Dany Madden <drt@linux.ibm.com>
Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Reviewed-by: Rick Lindsley <ricklind@linux.ibm.com>
Reviewed-by: Haren Myneni <haren@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Nick Child and committed by
David S. Miller
df8f66d0 92125c3a

+10
+10
drivers/net/ethernet/ibm/ibmvnic.c
··· 279 279 stride); 280 280 if (rc) 281 281 goto out; 282 + 283 + if (!queue) 284 + continue; 285 + 286 + rc = __netif_set_xps_queue(adapter->netdev, 287 + cpumask_bits(queue->affinity_mask), 288 + i, XPS_CPUS); 289 + if (rc) 290 + netdev_warn(adapter->netdev, "%s: Set XPS on queue %d failed, rc = %d.\n", 291 + __func__, i, rc); 282 292 } 283 293 284 294 for (i = 0; i < num_rxqs; i++) {