Skip to content

IB/mthca: Cleanup and optimize a few bitmap operation

Christophe JAILLET kernel-janitors linux-rdma lkml 1 version Applied

Status from this message: Applied to for-next, thanks

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4IB/mthca: Use bitmap_zalloc() when applicabledrivers/infiniband/hw/mthca/mthca_allocator.c drivers/infiniband/hw/mthca/mthca_mr.c+7 -110 replies
2/4IB/mthca: Use bitmap_set() when applicabledrivers/infiniband/hw/mthca/mthca_allocator.c+1 -40 replies
3/4IB/mthca: Use non-atomic bitmap functions when possible in 'mthca_allocator.c'drivers/infiniband/hw/mthca/mthca_allocator.c+2 -20 replies
4/4IB/mthca: Use non-atomic bitmap functions when possible in 'mthca_mr.c'drivers/infiniband/hw/mthca/mthca_mr.c+5 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] IB/mthca: Cleanup and optimize a few bitmap operation

Patch 1 and 2 are just cleanups that uses 'bitmap_zalloc()' and 'bitmap_set()' instead of hand-writing these functions.

Patch 3 and 4 are more questionable. They replace calls to '[set|clear]_bit()' by their non-atomic '__[set|clear]_bit()' alternatives.
In both files, it looks safe to do so because accesses to the corresponding bitmaps are protected by spinlocks.
However, these patches are compile tested only. It not sure it worth changing the code just for saving a few atomic operations.
So review, test and apply only if it make sense.

Christophe JAILLET (4):
IB/mthca: Use bitmap_zalloc() when applicable IB/mthca: Use bitmap_set() when applicable IB/mthca: Use non-atomic bitmap functions when possible in
'mthca_allocator.c'
IB/mthca: Use non-atomic bitmap functions when possible in

    'mthca_mr.c'
 drivers/infiniband/hw/mthca/mthca_allocator.c | 15 +++++--------
 drivers/infiniband/hw/mthca/mthca_mr.c        | 22 +++++++++----------
 2 files changed, 15 insertions(+), 22 deletions(-)
Signature · 1 line
2.30.2