On Sun, Nov 25, 2018 at 08:34:24PM +0200, Leon Romanovsky wrote: > diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c > index 9b195d65a13e..f600623ce3f7 100644 > +++ b/drivers/infiniband/hw/mlx5/mr.c > @@ -480,7 +480,8 @@ struct mlx5_ib_mr *mlx5_mr_cache_alloc(struct mlx5_ib_dev *dev, int entry) > if (err && err != -EAGAIN) > return ERR_PTR(err); > > - wait_for_completion(&ent->compl); > + wait_for_completion_timeout(&ent->compl, > + msecs_to_jiffies(20)); I think we should revisit this when the threading here is fixed, as I remarked in the prior ODP patches. Adding a delay like this seems like it will result in overfilling the cache in some situations, and is incredibly ugly. Jason