OSDN Git Service

RDMA/devices: Use xarray to store the client_data
authorJason Gunthorpe <jgg@mellanox.com>
Thu, 7 Feb 2019 05:41:53 +0000 (22:41 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 8 Feb 2019 23:56:45 +0000 (16:56 -0700)
commit0df91bb67334eebaf73d4ba32567e16d55f4f116
tree6c890dc02a59fee934a95904dd03f4acdd4cf552
parente59178d895afa29b671323f8265a1e50afe989e5
RDMA/devices: Use xarray to store the client_data

Now that we have a small ID for each client we can use xarray instead of
linearly searching linked lists for client data. This will give much
faster and scalable client data lookup, and will lets us revise the
locking scheme.

Since xarray can store 'going_down' using a mark just entirely eliminate
the struct ib_client_data and directly store the client_data value in the
xarray. However this does require a special iterator as we must still
iterate over any NULL client_data values.

Also eliminate the client_data_lock in favour of internal xarray locking.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/device.c
include/rdma/ib_verbs.h