[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1282138119.2194.75.camel@edumazet-laptop>
Date: Wed, 18 Aug 2010 15:28:39 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Dmitry Kozlov <xeb@...l.ru>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH v4] PPTP: PPP over IPv4 (Point-to-Point Tunneling
Protocol)
Le mercredi 18 août 2010 à 17:16 +0400, Dmitry Kozlov a écrit :
> > Hmm. You left a synchronize_rcu() call in add_chan() but this is not
> > necessary. Please remove it or explain why you think it is needed.
> >
> > synchronize_rcu(); in del_chan() is now fine, thanks.
> >
> >
> > You use a mutex for gre_proto_lock, but you dont need a mutex, please
> > use a spinlock like I suggested. I would have said 'use a mutex' if if
> > was needed, you can trust me.
>
> ok
>
> > A mutex is needed if you can sleep while holding the lock, this is not
> > the case here. A spinlock is faster and reduces to no-op on !SMP
>
> then i have to replace mutex on spinlock in pptp module too ?
>
Yes indeed, you can use a spinlock there too ;)
> > Also, please remove the synchronize_rcu() call from gre_add_protocol() :
> > It is not needed at all, like in add_chan().
> >
> > (You dont have to wait for a RCU grace period when adding something,
> > only when removing from a data structure)
>
> ok, seems like i don't fully understand rcu mechanism...
>
no problem, I dont fully understand rcu myself you know :)
> Thanks for reply.
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists