Eric Dumazet
ca6fb06518
tcp: attach SYNACK messages to request sockets instead of listener
...
If a listen backlog is very big (to avoid syncookies), then
the listener sk->sk_wmem_alloc is the main source of false
sharing, as we need to touch it twice per SYNACK re-transmit
and TX completion.
(One SYN packet takes listener lock once, but up to 6 SYNACK
are generated)
By attaching the skb to the request socket, we remove this
source of contention.
Tested:
listen(fd, 10485760); // single listener (no SO_REUSEPORT)
16 RX/TX queue NIC
Sustain a SYNFLOOD attack of ~320,000 SYN per second,
Sending ~1,400,000 SYNACK per second.
Perf profiles now show listener spinlock being next bottleneck.
20.29% [kernel] [k] queued_spin_lock_slowpath
10.06% [kernel] [k] __inet_lookup_established
5.12% [kernel] [k] reqsk_timer_handler
3.22% [kernel] [k] get_next_timer_interrupt
3.00% [kernel] [k] tcp_make_synack
2.77% [kernel] [k] ipt_do_table
2.70% [kernel] [k] run_timer_softirq
2.50% [kernel] [k] ip_finish_output
2.04% [kernel] [k] cascade
Signed-off-by: Eric Dumazet <edumazet@google.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2015-10-03 04:32:43 -07:00
..
2015-04-11 22:28:27 -04:00
2015-09-18 09:53:19 +02:00
2015-02-20 17:35:14 -05:00
2014-12-10 15:33:16 -05:00
2015-09-21 16:03:04 -07:00
2015-09-29 20:21:32 +02:00
2015-08-04 23:57:45 -07:00
2015-08-20 22:00:11 +02:00
2015-06-14 12:55:49 -07:00
2015-09-18 21:59:31 +02:00
2015-09-17 13:20:04 +02:00
2015-08-26 11:01:44 -07:00
2015-09-24 12:26:08 -07:00
2015-09-17 13:20:05 +02:00
2015-09-29 13:47:07 -07:00
2015-05-11 10:50:17 -04:00
2014-09-18 10:54:36 +02:00
2015-03-04 00:23:23 -05:00
2015-06-28 16:55:44 -07:00
2015-02-24 16:05:48 -05:00
2014-11-10 13:27:49 -05:00
2015-07-27 01:05:24 -07:00
2015-08-30 18:08:50 -04:00
2014-01-13 17:39:11 +01:00
2015-07-17 15:39:41 +02:00
2015-08-10 20:43:06 +02:00
2015-08-17 21:33:06 -07:00
2015-02-11 14:46:37 -05:00
2015-07-20 12:41:30 -07:00
2015-05-13 14:31:43 -04:00
2015-04-09 00:02:26 -04:00
2014-02-09 17:32:50 -08:00
2015-03-06 21:50:02 -05:00
2015-09-17 17:18:37 -07:00
2014-02-09 17:32:49 -08:00
2014-02-09 17:32:49 -08:00
2015-08-18 14:17:21 -07:00
2015-08-31 21:23:42 -07:00
2015-03-09 16:06:10 -04:00
2015-09-25 13:00:37 -07:00
2015-09-23 15:33:15 -07:00
2015-09-09 14:19:50 -07:00
2015-09-01 16:46:08 -07:00
2015-09-17 16:36:34 -07:00
2014-02-12 07:02:11 +01:00
2014-11-12 15:01:35 -05:00
2014-09-30 01:02:26 -04:00
2015-09-24 12:25:23 -07:00
2015-08-27 15:42:48 -07:00
2015-08-10 14:03:54 -07:00
2015-08-31 15:17:17 -07:00
2014-11-05 16:30:03 -05:00
2014-02-06 09:34:58 +01:00
2015-06-12 11:42:29 +02:00
2015-03-23 22:12:09 -04:00
2015-10-03 04:32:42 -07:00
2015-03-18 22:00:35 -04:00
2015-05-11 10:50:18 -04:00
2015-10-03 04:32:41 -07:00
2014-05-07 15:30:52 -04:00
2015-07-26 21:00:15 -07:00
2015-10-03 04:32:41 -07:00
2015-06-06 23:57:12 -07:00
2015-09-21 16:32:29 -07:00
2015-08-28 13:32:36 -07:00
2014-08-24 18:09:23 -07:00
2015-09-17 15:00:27 -07:00
2015-05-25 13:25:34 -04:00
2015-09-20 22:36:42 -07:00
2015-09-20 21:45:08 -07:00
2015-09-24 14:31:36 -07:00
2015-09-24 09:34:43 +09:00
2015-09-25 13:00:38 -07:00
2015-09-25 13:00:38 -07:00
2014-11-24 04:28:49 -05:00
2015-02-28 21:31:12 +01:00
2015-09-29 20:40:34 -07:00
2014-10-14 02:18:27 +02:00
2014-12-10 15:21:24 -05:00
2015-05-11 10:50:17 -04:00
2014-12-10 15:21:24 -05:00
2015-08-24 10:34:40 -07:00
2015-09-04 14:25:46 +02:00
2015-09-17 13:20:04 +02:00
2014-09-22 16:23:15 -04:00
2015-07-21 10:39:05 -07:00
2014-11-05 23:52:33 -08:00
2015-09-24 12:26:08 -07:00
2015-08-10 13:46:21 -07:00
2015-08-07 11:50:56 +02:00
2014-08-07 20:55:21 -04:00
2015-03-31 13:58:35 -04:00
2014-02-08 10:36:58 -05:00
2015-08-10 20:43:06 +02:00
2015-03-02 13:06:31 -05:00
2014-10-06 18:02:32 -04:00
2015-08-27 14:18:48 -07:00
2014-05-23 16:28:53 -04:00
2014-01-21 23:17:20 -08:00
2014-12-17 11:49:55 +01:00
2015-10-03 04:32:42 -07:00
2015-09-29 20:40:34 -07:00
2015-09-15 15:25:02 -07:00
2015-09-17 21:09:07 -07:00
2014-06-02 11:00:41 -07:00
2014-10-15 07:48:18 +02:00
2015-09-29 16:53:08 -07:00
2015-09-29 21:32:00 -07:00
2015-03-12 22:58:12 -04:00
2015-10-03 04:32:43 -07:00
2015-07-09 15:12:20 -07:00
2014-01-19 19:53:18 -08:00
2014-05-22 14:57:15 -04:00
2015-08-29 13:07:54 -07:00
2015-03-02 13:06:31 -05:00
2015-02-04 01:34:15 -05:00
2015-09-26 22:40:55 -07:00
2014-09-05 17:35:28 -07:00
2015-09-17 17:18:32 -07:00