Re: [PATCH rdma-next v1 1/7] RDMA/mlx5: Merge similar flows of allocating MR from the cache
From: Jason Gunthorpe
Date: Fri Jan 07 2022 - 15:07:07 EST
On Thu, Dec 30, 2021 at 01:23:18PM +0200, Leon Romanovsky wrote:
> if (list_empty(&ent->head)) {
> + if (ent->limit) {
> + queue_adjust_cache_locked(ent);
> + ent->miss++;
> + }
I don't this this addition of ent->limit makes any sense.
The only case it triggers is the two ODP callers and they should
definately increment miss.
queue_adjust_cache_locked() is an effective NOP if limit is zero as
available_mrs should be zero too.
Jason