On Thu, Jan 03, 2019 at 10:22:14PM +0000, Jason Gunthorpe wrote: > On Thu, Jan 03, 2019 at 10:05:56AM +0200, Leon Romanovsky wrote: > > > +static unsigned long res_to_id(struct rdma_restrack_entry *res) > > +{ > > + switch (res->type) { > > + case RDMA_RESTRACK_PD: > > + return container_of(res, struct ib_pd, res)->pdn; > > + case RDMA_RESTRACK_MR: > > + case RDMA_RESTRACK_CM_ID: > > + case RDMA_RESTRACK_CTX: > > + case RDMA_RESTRACK_CQ: > > + return (unsigned long)res; > > Matthew said xarray has horrible performance if used as a hash table > for something that is not inherently clustered - like pointer values. > > So I don't think this is a good idea. PD was in example, I'm converting all other objects too. > > Jason
Attachment:
signature.asc
Description: PGP signature