IB/qib: Change lkey table allocation to support more MRs
The lkey table is allocated with with a get_user_pages() with an order based on a number of index bits from a module parameter. The underlying kernel code cannot allocate that many contiguous pages. There is no reason the underlying memory needs to be physically contiguous. This patch: - switches the allocation/deallocation to vmalloc/vfree - caps the number of bits to 23 to insure at least 1 generation bit o this matches the module parameter description Cc: stable@vger.kernel.org Reviewed-by: Vinit Agnihotri <vinit.abhay.agnihotri@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
e0238a6a36
commit
d6f1c17e16
@@ -647,6 +647,8 @@ struct qib_qpn_table {
|
||||
struct qpn_map map[QPNMAP_ENTRIES];
|
||||
};
|
||||
|
||||
#define MAX_LKEY_TABLE_BITS 23
|
||||
|
||||
struct qib_lkey_table {
|
||||
spinlock_t lock; /* protect changes in this struct */
|
||||
u32 next; /* next unused index (speeds search) */
|
||||
|
Reference in New Issue
Block a user