IB/core: dma map/unmap locking optimizations
authorGuy Shapiro <guysh@mellanox.com>
Wed, 15 Apr 2015 15:17:56 +0000 (18:17 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 5 May 2015 13:18:02 +0000 (09:18 -0400)
commitc1d383b5785b1e0fb5fb862864712a7208219e6a
treeac3eb2c7467890e8665508c28b5b5c517b5a0e83
parent5b6b8fe64053b2649660ded2f3c5be25ebddbfdb
IB/core: dma map/unmap locking optimizations

Currently, while mapping or unmapping pages for ODP, the umem mutex is locked
and unlocked once for each page. Such lock/unlock operation take few tens to
hundreds of nsecs. This makes a significant impact when mapping or unmapping few
MBs of memory.

To avoid this, the mutex should be locked only once per operation, and not per
page.

Signed-off-by: Guy Shapiro <guysh@mellanox.com>
Acked-by: Shachar Raindel <raindel@mellanox.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/umem_odp.c