[ewg] [PATCH]mlx4_ib XRC RCV: Fix mlx4_ib_reg_xrc_rcv_qp() locking

sebastien dugue sebastien.dugue at bull.net
Wed Feb 16 05:51:00 PST 2011


On Wed, 16 Feb 2011 15:30:59 +0200
Jack Morgenstein <jackm at dev.mellanox.co.il> wrote:

> On Wednesday 16 February 2011 15:02, sebastien dugue wrote:
> >   Also, one thing I noticed in that same function: why allocate ctx_entry before
> > knowing if it's going to be of any use? The allocation could be done right before
> > the first use.
> > 
> I did it just to gather all the error returns at the beginning of the function.
> You are correct, though: I could have walked the list before doing the allocation.
> I don't see this as critical, though.
> 
> -Jack
> 

  Right, it's not critical, but I guess the XRC RCV reg/unreg may be sollicited
quite a lot under certain workloads, and avoiding an unneeded kmalloc is a sure
gain.

  On the other hand, I don't know whether trying to register an already registered
qp is a frequent thing, so maybe there's nothing to be gained after all. Dunno.

  Thanks,

  Sébastien.



More information about the ewg mailing list