]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Improve performance of interval RB trees
authorMitko Haralanov <mitko.haralanov@intel.com>
Thu, 12 May 2016 17:23:09 +0000 (10:23 -0700)
committerDoug Ledford <dledford@redhat.com>
Fri, 13 May 2016 23:39:16 +0000 (19:39 -0400)
commit3fdfa43bb6eb7465b8b6c50277f6a438707034ea
tree99a3447c05519f37fdf9e6208bbeffe15f49046f
parentdfaa02ef9306e76abb4553e4fd1fefb6c565c46f
IB/hfi1: Improve performance of interval RB trees

The interval RB tree management functions use handlers to
store user-specific callback for the various tree operations.
These handlers are put on a doubly-linked list. When a RB
tree function is called, the list is searched for the handler
of the particular tree.

The list which holds the handlers is modified very rarely - when
a handler is created and when a handler is removed. On the other
hand, it is searched very often. This a perfect usage scenario
for RCU.

The result is a much lower overhead of traversing the list as most
of the time no locking will be required.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/staging/rdma/hfi1/mmu_rb.c