]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Optimize lkey validation structures
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Mon, 10 Oct 2016 13:14:39 +0000 (06:14 -0700)
committerDoug Ledford <dledford@redhat.com>
Tue, 15 Nov 2016 21:25:59 +0000 (16:25 -0500)
commit290433c33dcff7c2fe99944db6bb5268463f2988
treebcd019917becfed26d1aefad8945a122adead81a
parent81acf6f0b36a1f2330881b68ffd0b5f1da15a08f
IB/hfi1: Optimize lkey validation structures

Profiling shows that the key validation is susceptible
to cache line trading when accessing the lkey table.

Fix by separating out the read mostly fields from the write
fields.   In addition the shift amount, which is function
of the lkey table size, is precomputed and stored with the
table pointer.   Since both the shift and table pointer
are in the same read mostly cacheline, this saves a cache
line in this hot path.

Reviewed-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rdmavt/mr.c
include/rdma/rdmavt_mr.h