linux/net/netfilter/ipvs
Julian Anastasov 9e4e948a3e ipvs: avoid rcu_barrier during netns cleanup
commit 578bc3ef1e ("ipvs: reorganize dest trash") added
rcu_barrier() on cleanup to wait dest users and schedulers
like LBLC and LBLCR to put their last dest reference.
Using rcu_barrier with many namespaces is problematic.

Trying to fix it by freeing dest with kfree_rcu is not
a solution, RCU callbacks can run in parallel and execution
order is random.

Fix it by creating new function ip_vs_dest_put_and_free()
which is heavier than ip_vs_dest_put(). We will use it just
for schedulers like LBLC, LBLCR that can delay their dest
release.

By default, dests reference is above 0 if they are present in
service and it is 0 when deleted but still in trash list.
Change the dest trash code to use ip_vs_dest_put_and_free(),
so that refcnt -1 can be used for freeing. As result,
such checks remain in slow path and the rcu_barrier() from
netns cleanup can be removed.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
2013-10-15 10:36:01 +09:00
..
ip_vs_app.c ipvs: do not disable bh for long time 2013-04-02 00:23:58 +02:00
ip_vs_conn.c ipvs: drop SCTP connections depending on state 2013-06-26 18:01:46 +09:00
ip_vs_core.c ipvs: make the service replacement more robust 2013-09-18 14:39:03 -05:00
ip_vs_ctl.c ipvs: avoid rcu_barrier during netns cleanup 2013-10-15 10:36:01 +09:00
ip_vs_dh.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_est.c ipvs: stats should not depend on CPU 0 2013-09-18 14:40:20 -05:00
ip_vs_ftp.c ipvs: do not disable bh for long time 2013-04-02 00:23:58 +02:00
ip_vs_lblc.c ipvs: avoid rcu_barrier during netns cleanup 2013-10-15 10:36:01 +09:00
ip_vs_lblcr.c ipvs: avoid rcu_barrier during netns cleanup 2013-10-15 10:36:01 +09:00
ip_vs_lc.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_nfct.c ipvs: remove silly double assignment 2012-10-28 22:50:51 +01:00
ip_vs_nq.c ipvs: fix overflow on dest weight multiply 2013-09-18 14:38:53 -05:00
ip_vs_pe_sip.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-04-30 03:55:20 -04:00
ip_vs_pe.c ipvs: convert services to rcu 2013-04-02 00:23:58 +02:00
ip_vs_proto_ah_esp.c ipvs: API change to avoid rescan of IPv6 exthdr 2012-09-28 11:34:33 +09:00
ip_vs_proto_sctp.c net/sctp: Refactor SCTP skb checksum computation 2013-07-27 20:07:15 -07:00
ip_vs_proto_tcp.c ipvs: sloppy TCP and SCTP 2013-06-26 18:01:46 +09:00
ip_vs_proto_udp.c ipvs: convert services to rcu 2013-04-02 00:23:58 +02:00
ip_vs_proto.c ipvs: Trivial changes, use compressed IPv6 address in output 2012-09-28 11:33:52 +09:00
ip_vs_rr.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_sched.c ipvs: convert services to rcu 2013-04-02 00:23:58 +02:00
ip_vs_sed.c ipvs: fix overflow on dest weight multiply 2013-09-18 14:38:53 -05:00
ip_vs_sh.c ipvs: ip_vs_sh: ip_vs_sh_get_port: check skb_header_pointer for NULL 2013-08-07 08:57:57 +09:00
ip_vs_sync.c ipvs: add sync_persist_mode flag 2013-06-26 18:01:46 +09:00
ip_vs_wlc.c ipvs: fix overflow on dest weight multiply 2013-09-18 14:38:53 -05:00
ip_vs_wrr.c ipvs: provide iph to schedulers 2013-06-26 18:01:45 +09:00
ip_vs_xmit.c ip: generate unique IP identificator if local fragmentation is allowed 2013-09-19 14:11:15 -04:00
Kconfig ipvs: Complete IPv6 fragment handling for IPVS 2012-09-28 11:34:24 +09:00
Makefile IPVS: sip persistence engine 2010-10-04 22:45:24 +09:00