Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Dmitry Kozlov <xeb@mail.ru>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v4] PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol)
Date: Wed, 18 Aug 2010 15:28:39 +0200	[thread overview]
Message-ID: <1282138119.2194.75.camel@edumazet-laptop> (raw)
In-Reply-To: <E1OliUz-0006py-00.xeb-mail-ru@f121.mail.ru>

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.
> 



      reply	other threads:[~2010-08-18 13:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 12:30 [PATCH v4] PPTP: PPP over IPv4 (Point-to-Point Tunneling Protocol) Dmitry Kozlov
2010-08-18 13:03 ` Eric Dumazet
2010-08-18 13:16   ` Dmitry Kozlov
2010-08-18 13:28     ` Eric Dumazet [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1282138119.2194.75.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=xeb@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox