]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mthca: Use non-atomic bitmap functions when possible in 'mthca_mr.c'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 24 Nov 2021 20:43:35 +0000 (21:43 +0100)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 25 Nov 2021 17:29:06 +0000 (13:29 -0400)
commit89540c8adf2c74a60f806a29d1c1915bfed357df
tree68695a94a3199e56396a65bbe11ab0834e840417
parent1de4b642d701e045e7938d6de5638b2a3305b241
IB/mthca: Use non-atomic bitmap functions when possible in 'mthca_mr.c'

In 'mthca_buddy_init()', the 'buddy->bits[n]' bitmap has just been
allocated, so no concurrent accesses can occur.

The other accesses to the 'buddy->bits[n]' bitmap are protected by the
'buddy->lock' spinlock, so no concurrent accesses can occur.

So prefer the non-atomic '__[set|clear]_bit()' functions to save a few
cycles.

Link: https://lore.kernel.org/r/a19b88ccdbc03972fd97306b998731814283041f.1637785902.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mthca/mthca_mr.c