linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Cleanup and optimize a few bitmap operations
@ 2021-11-24 21:30 Christophe JAILLET
  2021-11-24 21:40 ` [PATCH 1/3] RDMA/cxgb4: Use bitmap_zalloc() when applicable Christophe JAILLET
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Christophe JAILLET @ 2021-11-24 21:30 UTC (permalink / raw)
  To: bharat, dledford, jgg
  Cc: linux-rdma, linux-kernel, kernel-janitors, Christophe JAILLET

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

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

Christophe JAILLET (3):
  RDMA/cxgb4: Use bitmap_zalloc() when applicable
  RDMA/cxgb4: Use bitmap_set() when applicable
  RDMA/cxgb4: Use non-atomic bitmap functions when possible

 drivers/infiniband/hw/cxgb4/id_table.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-25 17:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24 21:30 [PATCH 0/3] Cleanup and optimize a few bitmap operations Christophe JAILLET
2021-11-24 21:40 ` [PATCH 1/3] RDMA/cxgb4: Use bitmap_zalloc() when applicable Christophe JAILLET
2021-11-24 21:40 ` [PATCH 2/3] RDMA/cxgb4: Use bitmap_set() " Christophe JAILLET
2021-11-24 21:40 ` [PATCH 3/3] RDMA/cxgb4: Use non-atomic bitmap functions when possible Christophe JAILLET
2021-11-25 17:30 ` [PATCH 0/3] Cleanup and optimize a few bitmap operations Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).