Re: [rfc 10/13] [RFC 10/13] IPVS: management of persistence engine modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 05 Aug 2010 20:48:05 +0900
Simon Horman <horms@xxxxxxxxxxxx> 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)

> +/* 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?
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux