OSDN Git Service

RDMA/mlx5: Allow MRs to be created in the cache synchronously
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 10 Mar 2020 08:22:38 +0000 (10:22 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 13 Mar 2020 14:08:02 +0000 (11:08 -0300)
commitaad719dcf379f1413dcb168413a53fea66e2ef90
tree490c6850431ff3459ece99c635048786d3547584
parent1c78a21a0c6f8df98a2281c1c0232f9c85e1c44d
RDMA/mlx5: Allow MRs to be created in the cache synchronously

If the cache is completely out of MRs, and we are running in cache mode,
then directly, and synchronously, create an MR that is compatible with the
cache bucket using a sleeping mailbox command. This ensures that the
thread that is waiting for the MR absolutely will get one.

When a MR allocated in this way becomes freed then it is compatible with
the cache bucket and will be recycled back into it.

Deletes the very buggy ent->compl scheme to create a synchronous MR
allocation.

Link: https://lore.kernel.org/r/20200310082238.239865-13-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c