netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org,
	Stephen Hemminger <shemminger@vyatta.com>,
	Wensong Zhang <wensong@linux-vs.org>,
	Julian Anastasov <ja@ssi.bg>
Subject: Re: [rfc] IPVS: convert scheduler management to RCU
Date: Sat, 21 Aug 2010 12:28:32 +0900	[thread overview]
Message-ID: <20100821032832.GB8616@verge.net.au> (raw)
In-Reply-To: <20100820192900.GD2447@linux.vnet.ibm.com>

On Fri, Aug 20, 2010 at 12:29:00PM -0700, Paul E. McKenney wrote:
> On Fri, Aug 20, 2010 at 10:59:19PM +0900, Simon Horman wrote:
> > On Fri, Aug 20, 2010 at 10:33:21PM +0900, Simon Horman wrote:
> > > Signed-off-by: Simon Horman <horms@verge.net.au>

[ snip ]

> > > @@ -223,8 +223,8 @@ int unregister_ip_vs_scheduler(struct ip
> > >  	/*
> > >  	 *	Remove it from the d-linked scheduler list
> > >  	 */
> > > -	list_del(&scheduler->n_list);
> > > -	write_unlock_bh(&__ip_vs_sched_lock);
> > > +	list_del_rcu(&scheduler->n_list);
> > > +	spin_unlock_bh(&ip_vs_sched_mutex);
> > 
> > On further reading, I believe that I need a synchronize_rcu(); here,
> 
> Good catch!

:-)

> However, you actually need synchronize_rcu_bh() to match your
> rcu_read_lock_bh() calls.  Also, given Julian's comment, you probably
> need something to show that this conversion is a real improvement.

Thanks.  As suggested by Julian and others, I've decided to just
use a spinlock and not use RCU for this.


  reply	other threads:[~2010-08-21  3:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-20 13:33 [rfc] IPVS: convert scheduler management to RCU Simon Horman
2010-08-20 13:44 ` Changli Gao
2010-08-20 14:00   ` Simon Horman
2010-08-20 14:05   ` Eric Dumazet
2010-08-20 14:16     ` yao zhao
2010-08-20 14:32       ` Eric Dumazet
2010-08-20 15:04         ` yao zhao
2010-08-20 15:32           ` Eric Dumazet
2010-08-20 17:54             ` yao zhao
2010-08-20 14:33       ` Simon Horman
2010-08-20 14:31     ` Simon Horman
2010-08-20 13:59 ` Simon Horman
2010-08-20 19:29   ` Paul E. McKenney
2010-08-21  3:28     ` Simon Horman [this message]
2010-08-20 18:03 ` Julian Anastasov
2010-08-21  3:30   ` Simon Horman

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=20100821032832.GB8616@verge.net.au \
    --to=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=shemminger@vyatta.com \
    --cc=wensong@linux-vs.org \
    /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;
as well as URLs for NNTP newsgroup(s).