Commit df8f66d0 authored by Nick Child's avatar Nick Child Committed by David S. Miller

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: default avatarThomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: default avatarDany Madden <drt@linux.ibm.com>
Signed-off-by: default avatarNick Child <nnac123@linux.ibm.com>
Reviewed-by: default avatarRick Lindsley <ricklind@linux.ibm.com>
Reviewed-by: default avatarHaren Myneni <haren@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 92125c3a
...@@ -279,6 +279,16 @@ static void ibmvnic_set_affinity(struct ibmvnic_adapter *adapter) ...@@ -279,6 +279,16 @@ static void ibmvnic_set_affinity(struct ibmvnic_adapter *adapter)
stride); stride);
if (rc) if (rc)
goto out; goto out;
if (!queue)
continue;
rc = __netif_set_xps_queue(adapter->netdev,
cpumask_bits(queue->affinity_mask),
i, XPS_CPUS);
if (rc)
netdev_warn(adapter->netdev, "%s: Set XPS on queue %d failed, rc = %d.\n",
__func__, i, rc);
} }
for (i = 0; i < num_rxqs; i++) { for (i = 0; i < num_rxqs; i++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment