On Tue, Sep 11, 2007 at 10:05:10AM -0400, Vlad Yasevich wrote:
> Sridhar, Paul
> 
> Thanks for review.  Some answers and questions below...

NP!

> Sridhar Samudrala wrote:
> > Paul E. McKenney wrote:

[ . . . ]

> >>>                  if ((PF_INET == sk->sk_family) &&
> >>>                      (AF_INET6 == addr->a.sa.sa_family))
> >>>                      continue;
> >>> +
> >>>                  cnt++;
> >>>              }
> >>> +            rcu_read_unlock();
> >>
> >> We are just counting these things, right?  If on the other hand we are
> >> keeping a reference outside of rcu_read_lock() protection, then there
> >> needs to be some explicit mechanism preventing the corresponding entry
> >> from being freed.
> 
> In this particular case, we are just counting.  There are other cases,
> we make a copy of the address in the list.  The goal was to reduce the
> probability that an address that is about to be deleted at the rcu
> quiescent state will not be copied/counted.
> 
> My other thought was to use atomics, but with all the yelling about 
> atomic_read(),
> that didn't seem any better then a simple __u8 flag.

If just counting, then no worries either way.  As long as you are counting
to a local variable, as in fact you are.

                                                        Thanx, Paul
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to