[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100806014843.GE12311@verge.net.au>
Date: Fri, 6 Aug 2010 10:48:44 +0900
From: Simon Horman <horms@...ge.net.au>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: lvs-devel@...r.kernel.org, netdev@...r.kernel.org,
netfilter@...r.kernel.org, netfilter-devel@...r.kernel.org,
Wensong Zhang <wensong@...ux-vs.org>,
Julian Anastasov <ja@....bg>, Patrick McHardy <kaber@...sh.net>
Subject: Re: [rfc 10/13] [RFC 10/13] IPVS: management of persistence engine
modules
On Thu, Aug 05, 2010 at 09:29:20AM -0700, Stephen Hemminger wrote:
> On Thu, 05 Aug 2010 20:48:05 +0900
> Simon Horman <horms@...ge.net.au> wrote:
>
> > +/* lock for service table */
> > +static DEFINE_RWLOCK(__ip_vs_pe_lock);
>
> It is already static so why the __?
> Reader/writer locks are slower than spinlocks. Either use
> a spinlock, or RCU (if possible)
No good reason, other than I copied the code from elsewhere.
I'll fix both this and the code that I copied.
> > +/* Bind a service with a pe */
> > +void ip_vs_bind_pe(struct ip_vs_service *svc, struct ip_vs_pe *pe)
> > +{
> > + svc->pe = pe;
> > +}
> > +
> > +/* Unbind a service from its pe */
> > +void ip_vs_unbind_pe(struct ip_vs_service *svc)
> > +{
> > + svc->pe = NULL;
> > +}
>
> What does having these wrappers buy?
Again, I copied the code from elsewhere, where the wrappers did more. As
it happens, I think that these do make some sense as they are called along
side other bind and unbind calls. But if you have a strong aversion to them
then I am happy to remove these wrappers.
--
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