linux/net/ipv4
Florian Westphal b13d3cbfb8 inet: frag: move eviction of queues to work queue
When the high_thresh limit is reached we try to toss the 'oldest'
incomplete fragment queues until memory limits are below the low_thresh
value.  This happens in softirq/packet processing context.

This has two drawbacks:

1) processors might evict a queue that was about to be completed
by another cpu, because they will compete wrt. resource usage and
resource reclaim.

2) LRU list maintenance is expensive.

But when constantly overloaded, even the 'least recently used' element is
recent, so removing 'lru' queue first is not 'fairer' than removing any
other fragment queue.

This moves eviction out of the fast path:

When the low threshold is reached, a work queue is scheduled
which then iterates over the table and removes the queues that exceed
the memory limits of the namespace. It sets a new flag called
INET_FRAG_EVICTED on the evicted queues so the proper counters will get
incremented when the queue is forcefully expired.

When the high threshold is reached, no more fragment queues are
created until we're below the limit again.

The LRU list is now unused and will be removed in a followup patch.

Joint work with Nikolay Aleksandrov.

Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-27 22:34:35 -07:00
..
netfilter netfilter: use IS_ENABLED() macro 2014-06-30 11:38:03 +02:00
af_inet.c net-gre-gro: Fix a bug that breaks the forwarding path 2014-07-16 14:45:26 -07:00
ah4.c
arp.c
cipso_ipv4.c
datagram.c net: Save TX flow hash in sock and set in skbuf on xmit 2014-07-07 21:14:21 -07:00
devinet.c
esp4.c
fib_frontend.c
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c
gre_demux.c GRE: enable offloads for GRE 2014-07-11 13:53:39 -07:00
gre_offload.c net-gre-gro: Fix a bug that breaks the forwarding path 2014-07-16 14:45:26 -07:00
icmp.c ipv4: icmp: Fix pMTU handling for rare case 2014-07-07 17:22:57 -07:00
igmp.c igmp: remove exceptional & on function name 2014-07-24 23:23:31 -07:00
inet_connection_sock.c
inet_diag.c
inet_fragment.c inet: frag: move eviction of queues to work queue 2014-07-27 22:34:35 -07:00
inet_hashtables.c
inet_lro.c
inet_timewait_sock.c
inetpeer.c
ip_forward.c
ip_fragment.c inet: frag: move eviction of queues to work queue 2014-07-27 22:34:35 -07:00
ip_gre.c
ip_input.c
ip_options.c ipv4: fix buffer overflow in ip_options_compile() 2014-07-21 20:16:26 -07:00
ip_output.c net-timestamp: SOCK_RAW and PING timestamping 2014-07-15 16:32:45 -07:00
ip_sockglue.c
ip_tunnel.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-16 14:09:34 -07:00
ip_tunnel_core.c
ip_vti.c
ipcomp.c
ipconfig.c ipconfig: Only bootp paths should reference ic_dev_xid. 2014-07-09 22:25:18 -07:00
ipip.c
ipmr.c net: set name_assign_type in alloc_netdev() 2014-07-15 16:12:48 -07:00
Kconfig udp: Add udp_sock_create for UDP tunnels to open listener socket 2014-07-14 16:12:15 -07:00
Makefile udp: Add udp_sock_create for UDP tunnels to open listener socket 2014-07-14 16:12:15 -07:00
netfilter.c
ping.c
proc.c
protocol.c
raw.c ipv4: Make IP_MULTICAST_ALL and IP_MSFILTER work on raw sockets 2014-07-23 15:13:26 -07:00
route.c ipv4: irq safe sk_dst_[re]set() and ipv4_sk_update_pmtu() fix 2014-06-30 23:40:58 -07:00
syncookies.c tcp: cookie_v4_init_sequence: skb should be const 2014-06-27 15:53:35 -07:00
sysctl_net_ipv4.c
tcp.c tcp: Fix divide by zero when pushing during tcp-repair 2014-07-02 18:21:03 -07:00
tcp_bic.c
tcp_cong.c
tcp_cubic.c
tcp_diag.c
tcp_fastopen.c
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-16 14:09:34 -07:00
tcp_ipv4.c net: Save TX flow hash in sock and set in skbuf on xmit 2014-07-07 21:14:21 -07:00
tcp_lp.c
tcp_memcontrol.c
tcp_metrics.c
tcp_minisocks.c inet: move ipv6only in sock_common 2014-07-01 23:46:21 -07:00
tcp_offload.c net-gre-gro: Fix a bug that breaks the forwarding path 2014-07-16 14:45:26 -07:00
tcp_output.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-07-16 14:09:34 -07:00
tcp_probe.c
tcp_scalable.c
tcp_timer.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c sock: remove skb argument from sk_rcvqueues_full 2014-07-23 13:23:06 -07:00
udp_diag.c
udp_impl.h
udp_offload.c udp: Move udp_tunnel_segment into udp_offload.c 2014-07-14 16:12:15 -07:00
udp_tunnel.c udp: Add udp_sock_create for UDP tunnels to open listener socket 2014-07-14 16:12:15 -07:00
udplite.c
xfrm4_input.c
xfrm4_mode_beet.c
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c