aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
author[email protected] <[email protected]>2018-06-13 05:34:03 -0700
committerJason Gunthorpe <[email protected]>2018-06-18 11:22:54 -0600
commit9a41e38a467c06a0c48369970ce5a9f790edd64d (patch)
tree382d5e0923c4a76b8884e5b1407a818b9d5986ac /tools/perf/scripts/python
parent3c60e868c31e4ff144776bf53ff0dfe9e9e4ec15 (diff)
IB/mad: Use IDR for agent IDs
Allocate agent IDs from a global IDR instead of an atomic variable. This eliminates the possibility of reusing an ID which is already in use after 4 billion registrations. We limit the assigned ID to be less than 2^24 as the mlx4 driver uses the most significant byte of the agent ID to store the slave number. Users unlucky enough to see a collision between agent numbers and slave numbers see messages like: mlx4_ib: egress mad has non-null tid msb:1 class:4 slave:0 and the MAD layer stops working. We look up the agent under protection of the RCU lock, which means we have to free the agent using kfree_rcu, and only increment the reference counter if it is not 0. Signed-off-by: Matthew Wilcox <[email protected]> Reported-by: Hans Westgaard Ry <[email protected]> Acked-by: Jack Morgenstein <[email protected]> Tested-by: Jack Morgenstein <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions