rwlock patch for bridge
    Andrew Thompson 
    thompsa at freebsd.org
       
    Sat Feb 18 20:10:25 PST 2006
    
    
  
On Fri, Feb 17, 2006 at 01:42:11PM -0500, John Baldwin wrote:
> On Wednesday 15 February 2006 16:15, Andrew Thompson wrote:
> >
> > Here is a patch that changes if_bridge to use rwlock(9) rather than the
> > handrolled ref counting. Can I please get it reviewed to ensure I have
> > the changes correct. I pondered if the order of unlocking the softc
> > mutex and grabbing the rlock mattered but decided it didn't.
> 
> Have you thought about replacing both the mutex and ref-count with the single 
> rwlock?  (Perhaps that is infeasible, but it would be somewhat pointless to 
> just lock one lock so you can turn around and lock the next.)
The bridge code makes use of callout_init_mtx(), can a rwlock be passed
instead of a mutex?
cheers,
Andrew
    
    
More information about the freebsd-current
mailing list