[ofw] patch[ipoib]: fix a deadlock

Uri Habusha urih at mellanox.co.il
Mon Feb 14 11:51:21 PST 2011


The synchronize mechanism here is bad. However for now I don't want to make a wide change and I want to resolve the specific deadlock.

We are now in the middle of reexamination process of IPoIB. We check what is the best way to improve the quality and the maintenance process of the IPoIB.

When we get a decision we'll update the community.  

Uri

-----Original Message-----
From: Hefty, Sean [mailto:sean.hefty at intel.com] 
Sent: Monday, February 14, 2011 5:41 PM
To: Uri Habusha; ofw at lists.openfabrics.org
Subject: RE: patch[ipoib]: fix a deadlock

>                 /* Wait for all readers to complete. */
> 
>                 while( p_port->endpt_rdr )
> 
> -                              ;
> 
> +             {
> 
> +                             cl_obj_unlock( &p_port->obj );
> 
> +                             cl_obj_lock( &p_port->obj );
> 
> +             }

How often are there multiple readers?  How long does a reader hold the lock for?  And do we need to use a spinlock?

Also, doesn't complib provide a reader-writer lock abstraction?




More information about the ofw mailing list