Eric Dumazet
583396f4ca
net_sched: sch_fq: enable use of hrtimer slack
Add a new attribute to control the fq qdisc hrtimer slack.
Default is set to 10 usec.
When/if packets are throttled, fq set up an hrtimer that can
lead to one interrupt per packet in the throttled queue.
By using a timer slack, we allow better use of timer interrupts,
by giving them a chance to call multiple timer callbacks
at each hardware interrupt.
Also, giving a slack allows FQ to dequeue batches of packets
instead of a single one, thus increasing xmit_more efficiency.
This has no negative effect on the rate a TCP flow can sustain,
since each TCP flow maintains its own precise vtime (tp->tcp_wstamp_ns)
v2: added strict netlink checking (as feedback from Jakub Kicinski)
Tested:
1000 concurrent flows all using paced packets.
1,000,000 packets sent per second.
Before the patch :
$ vmstat 2 10
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 60726784 23628 3485992 0 0 138 1 977 535 0 12 87 0 0
0 0 0 60714700 23628 3485628 0 0 0 0 1568827 26462 0 22 78 0 0
1 0 0 60716012 23628 3485656 0 0 0 0 1570034 26216 0 22 78 0 0
0 0 0 60722420 23628 3485492 0 0 0 0 1567230 26424 0 22 78 0 0
0 0 0 60727484 23628 3485556 0 0 0 0 1568220 26200 0 22 78 0 0
2 0 0 60718900 23628 3485380 0 0 0 40 1564721 26630 0 22 78 0 0
2 0 0 60718096 23628 3485332 0 0 0 0 1562593 26432 0 22 78 0 0
0 0 0 60719608 23628 3485064 0 0 0 0 1563806 26238 0 22 78 0 0
1 0 0 60722876 23628 3485236 0 0 0 130 1565874 26566 0 22 78 0 0
1 0 0 60722752 23628 3484908 0 0 0 0 1567646 26247 0 22 78 0 0
After the patch, slack of 10 usec, we can see a reduction of interrupts
per second, and a small decrease of reported cpu usage.
$ vmstat 2 10
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 0 0 60722564 23628 3484728 0 0 133 1 696 545 0 13 87 0 0
1 0 0 60722568 23628 3484824 0 0 0 0 977278 25469 0 20 80 0 0
0 0 0 60716396 23628 3484764 0 0 0 0 979997 25326 0 20 80 0 0
0 0 0 60713844 23628 3484960 0 0 0 0 981394 25249 0 20 80 0 0
2 0 0 60720468 23628 3484916 0 0 0 0 982860 25062 0 20 80 0 0
1 0 0 60721236 23628 3484856 0 0 0 0 982867 25100 0 20 80 0 0
1 0 0 60722400 23628 3484456 0 0 0 8 982698 25303 0 20 80 0 0
0 0 0 60715396 23628 3484428 0 0 0 0 981777 25176 0 20 80 0 0
0 0 0 60716520 23628 3486544 0 0 0 36 978965 27857 0 21 79 0 0
0 0 0 60719592 23628 3486516 0 0 0 22 977318 25106 0 20 80 0 0
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-03-17 21:16:35 -07:00
..
2019-11-05 12:44:34 +01:00
2019-06-05 10:55:30 -04:00
2020-01-21 11:41:36 +01:00
2019-09-07 17:44:25 +02:00
2020-02-17 10:55:14 +01:00
2019-10-04 14:25:17 -07:00
2019-10-04 14:25:17 -07:00
2019-10-04 14:25:17 -07:00
2019-10-04 14:25:17 -07:00
2019-09-10 09:26:33 -04:00
2019-09-13 13:10:06 -07:00
2019-06-24 19:23:46 +02:00
2019-11-21 11:44:06 -08:00
2020-02-10 11:08:30 -08:00
2019-12-18 18:07:31 +01:00
2019-06-26 20:14:13 -04:00
2019-12-11 17:41:09 +01:00
2020-01-01 00:00:33 +01:00
2020-01-01 00:00:33 +01:00
2020-01-23 11:40:01 -07:00
2019-11-07 06:31:50 -07:00
2020-03-12 17:47:38 -07:00
2019-07-25 11:05:10 +02:00
2020-01-10 17:20:07 +01:00
2019-11-18 17:51:49 +01:00
2019-11-18 17:51:49 +01:00
2019-11-05 12:44:34 +01:00
2020-01-28 10:09:51 +01:00
2019-10-07 07:55:17 -03:00
2019-10-01 17:19:41 -03:00
2019-10-09 22:31:14 -04:00
2019-07-16 19:23:23 -07:00
2019-09-25 17:51:39 -07:00
2019-08-02 14:44:02 +10:00
2019-11-15 14:38:29 +01:00
2019-10-28 13:41:01 -07:00
2020-03-03 15:40:40 -08:00
2020-03-03 11:10:21 -05:00
2019-06-14 15:00:51 +05:30
2019-12-17 21:37:40 +05:30
2019-11-15 14:38:29 +01:00
2019-11-15 14:38:29 +01:00
2020-03-12 15:32:33 -07:00
2020-02-18 19:17:31 -08:00
2020-01-18 09:19:18 -05:00
2019-08-05 17:56:46 +02:00
2019-09-21 14:26:33 -07:00
2019-12-31 10:33:51 -06:00
2019-08-12 19:33:50 -07:00
2019-10-23 14:26:37 +02:00
2019-11-05 18:20:55 -08:00
2019-11-12 16:30:31 +01:00
2019-09-04 12:43:54 +02:00
2019-12-11 15:31:52 +01:00
2020-01-24 11:18:45 +05:30
2020-02-29 21:52:20 -08:00
2019-12-26 13:09:37 -08:00
2020-01-24 12:58:14 +01:00
2019-06-05 13:04:29 -07:00
2020-02-24 13:31:42 -08:00
2020-03-16 01:42:31 -07:00
2019-06-29 11:06:17 -07:00
2019-08-31 01:08:26 +02:00
2020-01-21 11:41:36 +01:00
2020-03-11 23:49:30 -07:00
2020-02-27 18:50:19 -08:00
2019-12-07 18:33:01 -08:00
2019-12-13 15:00:36 -08:00
2020-01-29 15:46:09 -07:00
2019-10-15 13:34:43 +02:00
2019-07-04 02:29:49 +02:00
2019-07-25 11:05:10 +02:00
2019-07-25 11:05:10 +02:00
2019-08-22 17:24:51 +02:00
2020-01-04 13:55:09 -08:00
2019-09-08 15:37:04 +02:00
2019-07-10 18:43:43 -07:00
2019-08-07 10:21:38 -05:00
2019-07-02 18:56:01 +02:00
2020-01-31 12:50:04 +01:00
2019-11-06 21:14:22 -08:00
2020-02-07 14:39:38 +09:00
2019-08-19 13:04:45 -07:00
2019-06-25 22:14:11 +02:00
2019-06-21 16:45:38 -04:00
2020-01-05 23:22:32 -08:00
2019-11-15 14:38:29 +01:00
2020-03-02 11:16:28 -08:00
2019-12-25 19:51:34 -08:00
2019-05-28 21:37:30 -07:00
2019-07-12 11:05:40 -07:00
2020-02-24 13:56:57 +01:00
2019-11-06 06:17:38 +09:00
2020-01-18 09:19:18 -05:00
2020-02-16 19:34:44 -08:00
2020-01-09 11:57:18 +00:00
2019-11-13 11:06:14 +01:00
2019-10-02 20:32:27 -06:00
2020-03-08 21:07:48 -07:00
2020-03-17 21:16:35 -07:00
2019-07-30 20:34:34 +02:00
2019-12-01 14:00:59 -08:00
2019-10-23 17:23:47 +02:00
2020-01-28 10:09:51 +01:00
2019-10-26 02:09:58 +11:00
2019-11-15 12:48:32 -08:00
2019-07-16 19:23:24 -07:00
2020-01-07 16:07:01 -05:00
2019-08-24 16:55:25 -07:00
2019-11-15 14:38:29 +01:00
2019-12-18 10:37:18 +01:00
2020-01-15 13:48:18 +01:00
2019-07-25 11:05:10 +02:00
2019-12-04 19:44:12 -08:00
2020-01-14 12:20:48 +01:00
2019-11-08 14:18:32 -08:00
2019-10-28 12:29:46 -07:00
2019-11-04 07:11:31 -07:00
2019-11-15 14:38:29 +01:00
2019-10-16 06:11:24 -07:00
2019-07-22 07:35:24 +03:00
2019-11-15 14:38:29 +01:00
2020-01-26 15:28:47 +01:00
2020-02-27 18:50:19 -08:00
2019-08-03 11:02:46 -07:00
2019-11-13 12:15:34 -08:00
2020-02-21 11:22:15 -08:00
2020-01-15 11:00:39 -06:00
2020-01-31 10:30:39 -08:00
2019-12-18 18:07:31 +01:00
2020-03-09 17:56:33 -07:00
2020-01-04 13:49:51 +08:00
2019-12-18 18:07:33 +01:00
2020-02-21 11:22:15 -08:00
2019-12-18 18:07:33 +01:00
2019-10-04 14:25:17 -07:00
2019-12-20 21:18:42 -08:00
2019-11-08 14:01:59 -08:00
2019-08-31 23:44:28 -07:00
2019-12-09 09:59:07 +01:00
2019-05-22 10:36:35 -07:00
2019-08-14 16:52:13 +02:00
2019-11-15 14:38:29 +01:00
2019-10-10 11:37:26 -03:00
2019-07-25 11:05:10 +02:00
2019-07-25 11:05:10 +02:00
2019-08-23 11:26:24 -06:00
2020-01-03 15:50:21 +01:00
2019-09-18 20:17:50 +02:00
2019-09-18 20:17:50 +02:00
2019-07-22 11:52:27 -04:00
2019-07-25 11:05:10 +02:00
2019-10-04 14:25:17 -07:00
2019-12-11 15:01:23 -08:00
2019-07-25 11:05:10 +02:00
2019-08-01 21:49:46 +02:00
2019-12-16 19:22:22 -08:00
2019-12-13 10:45:35 +01:00
2019-07-25 11:05:10 +02:00