aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma/ocrdma_main.c
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2015-07-09 10:21:08 -0400
committerDoug Ledford <dledford@redhat.com>2015-07-14 13:20:15 -0400
commitd9a047aeffcef5755952d18f2901d8777d84019d (patch)
tree2167b6bb6832d31bb7ba86ea4c4140ef4cd50bf6 /drivers/infiniband/hw/ocrdma/ocrdma_main.c
parentIB/mlx4: Fix memory leak in do_slave_init (diff)
downloadlinux-dev-d9a047aeffcef5755952d18f2901d8777d84019d.tar.xz
linux-dev-d9a047aeffcef5755952d18f2901d8777d84019d.zip
IB/mlx4: Optimize do_slave_init
There is little chance our memory allocation will fail, so we can combine initializing the work structs with allocating them instead of looping through all of them once to allocate and again to initialize. Then when we need to actually find out if our device is up or in the process of going down, have all of our work structs batched up, take the spin_lock once and only once, and do all of the batch under the one spin_lock invocation instead of incurring all of the locked memory cycles we would otherwise incur to take/release the spin_lock over and over again. Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions