Thread (6 messages) 6 messages, 3 authors, 2007-11-05

Re: dn_route.c momentarily exiting RCU read-side critical section

From: Paul E. McKenney <hidden>
Date: 2007-11-05 17:21:32
Also in: lkml

On Mon, Nov 05, 2007 at 07:53:04PM +0800, Herbert Xu wrote:
Paul E. McKenney [off-list ref] wrote:
quoted
quoted
quoted
net/decnet/dn_route.c in dn_rt_cache_get_next() is as follows:

static struct dn_route *dn_rt_cache_get_next(struct seq_file *seq, struct dn_route *rt)
{
    struct dn_rt_cache_iter_state *s = rcu_dereference(seq->private);

    rt = rt->u.dst.dn_next;
    while(!rt) {
            rcu_read_unlock_bh();
            if (--s->bucket < 0)
                    break;
OK, for my next stupid question: why is the rcu_dereference(seq->private)
required, as opposed to simply seq->private?
It was put there by someone who went through the code converting
all occurances of smp_read_barrier_depends to rcu_dereference.
In this instance the rcu_dereference conversion doesn't make much
sense so we should probably just revert it.
Thank you for the info!  Stupid question #3: what sequence of events
would the smp_read_barrier_depends() be defending against?

							Thanx, Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help