From: Simon Horman <horms@verge.net.au>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>,
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>,
Paul E McKenney <paulmck@linux.vnet.ibm.com>
Subject: Re: [rfc] IPVS: convert scheduler management to RCU
Date: Fri, 20 Aug 2010 23:31:52 +0900 [thread overview]
Message-ID: <20100820143148.GA2277@verge.net.au> (raw)
In-Reply-To: <1282313150.2484.65.camel@edumazet-laptop>
On Fri, Aug 20, 2010 at 04:05:50PM +0200, Eric Dumazet wrote:
> Le vendredi 20 août 2010 à 21:44 +0800, Changli Gao a écrit :
> > On Fri, Aug 20, 2010 at 9:33 PM, Simon Horman <horms@verge.net.au> wrote:
> > > Signed-off-by: Simon Horman <horms@verge.net.au>
> > >
> > > ---
> > >
> > > I'm still getting my head around RCU, so review would be greatly appreciated.
> > >
> > > It occurs to me that this code is not performance critical, so
> > > perhaps simply replacing the rwlock with a spinlock would be better?
> > >
> > > Index: nf-next-2.6/net/netfilter/ipvs/ip_vs_sched.c
>
>
> > > - write_unlock_bh(&__ip_vs_sched_lock);
> > > + list_del_rcu(&scheduler->n_list);
> > > + spin_unlock_bh(&ip_vs_sched_mutex);
> >
> > Need a rcu_barrier_bh().
> >
> > >
> > > /* decrease the module use count */
> > > ip_vs_use_count_dec();
>
>
> Quite frankly, if this is not performance critical, just use the
> spinlock (and dont use 'mutex' in its name ;) )
Will do.
> Using RCU here will force at least one RCU grace period at dismantle
> time...
>
>
next prev parent reply other threads:[~2010-08-20 14:31 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 [this message]
2010-08-20 13:59 ` Simon Horman
2010-08-20 19:29 ` Paul E. McKenney
2010-08-21 3:28 ` Simon Horman
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=20100820143148.GA2277@verge.net.au \
--to=horms@verge.net.au \
--cc=eric.dumazet@gmail.com \
--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 \
--cc=xiaosuo@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.