[rds-devel] [PATCH 17/21] RDS/IB: Receive datagrams via IB
    Roland Dreier 
    rdreier at cisco.com
       
    Thu Jan 29 13:47:03 PST 2009
    
    
  
 > > > This is racy.  You check if you're at the limit, do the allocation, and
 > > > then increment the atomic rds_ib_allocation count.  So many threads can
 > > > pass the atomic_read() test and then take you over the limit.  If you
 > > > want to make it safe then you could do atomic_inc_return() and check if
 > > > that took you over the limit.
 > >
 > > Woah, yup, thanks.
 > 
 > The refill code used to be single-threaded; and I think it still is. So
 > this can't race I think
So you don't need the atomic op at all?
 - R.
    
    
More information about the rds-devel
mailing list