lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100820143359.GB2277@verge.net.au>
Date:	Fri, 20 Aug 2010 23:33:59 +0900
From:	Simon Horman <horms@...ge.net.au>
To:	yao zhao <dragonlinux@...il.com>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	Changli Gao <xiaosuo@...il.com>, lvs-devel@...r.kernel.org,
	netdev@...r.kernel.org, netfilter-devel@...r.kernel.org,
	Stephen Hemminger <shemminger@...tta.com>,
	Wensong Zhang <wensong@...ux-vs.org>,
	Julian Anastasov <ja@....bg>,
	Paul E McKenney <paulmck@...ux.vnet.ibm.com>
Subject: Re: [rfc] IPVS: convert scheduler management to RCU

On Fri, Aug 20, 2010 at 10:16:23AM -0400, yao zhao wrote:
> On Fri, Aug 20, 2010 at 10:05 AM, Eric Dumazet <eric.dumazet@...il.com> 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@...ge.net.au> wrote:
> >> > Signed-off-by: Simon Horman <horms@...ge.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 ;) )
> >
> if it is not performance critical, you should use  the
> read_lock/write_lock, it should make the readers happier than
> spinlock.

The whole point of the exercise is to stop using read_lock/write_lock
because they are generally slower than a spinlock.

> the name "mutex" is a little bit confuse.
> synchronize_rcu() is not necessary when you only need to delete from a
> list as it is atomic.
>
> > Using RCU here will force at least one RCU grace period at dismantle
> > time...
> >
> >
> >
> > --
> > 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
> >
> 
> yao
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ