lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Aug 2017 14:51:32 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Vincent Bernat <vincent@...nat.im>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Jiri Pirko <jiri@...lanox.com>, netdev@...r.kernel.org,
        David Ahern <dsa@...ulusnetworks.com>
Subject: Re: [net-next v1] net: ipv6: avoid overhead when no custom FIB rules
 are installed

Tue, Aug 08, 2017 at 01:51:21PM CEST, vincent@...nat.im wrote:
>If the user hasn't installed any custom rules, don't go through the
>whole FIB rules layer. This is pretty similar to f4530fa574df (ipv4:
>Avoid overhead when no custom FIB rules are installed).
>
>Using a micro-benchmark module [1], timing ip6_route_output() using
>get_cycles(), on my laptop with performance governor (so, subject to
>some caution due to thermal throttling), with 40,000 routes in the main
>routing table, before this patch:
>
>    min=603 max=12477 count=627 average=1926 95th=4518 90th=3661 50th=1600 mad=724
>    table=254 avgdepth=21.8 maxdepth=39
>        value │                         ┊                            count
>          600 │▒▒▒▒▒▒▒▒▒▒                                              134
>          860 │▒▒▒▒▒▒▒░░░░░░░░░░                                        91
>         1120 │▒▒▒░░░░░░░░░░░░░░░░░░                                    39
>         1380 │▒▒▒▒░░░░░░░░░░░░░░░░░░░░░                                58
>         1640 │▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░                           57
>         1900 │▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░                       58
>         2160 │▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░                   46
>         2420 │▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░                 26
>         2680 │▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░               27
>         2940 │▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░              15
>         3200 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░              8
>         3460 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░             8
>         3720 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░           12
>         3980 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░            9
>         4240 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░           7
>         4500 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░           6
>
>After:
>
>    min=486 max=12390 count=627 average=1715 95th=4365 90th=3352 50th=1324 mad=631
>    table=254 avgdepth=21.8 maxdepth=39
>        value │                         ┊                            count
>          480 │▒▒▒▒▒▒▒▒▒▒▒▒                                            153
>          730 │▒▒▒▒▒▒▒░░░░░░░░░░░░                                      88
>          980 │▒▒▒▒░░░░░░░░░░░░░░░░░░░                                  57
>         1230 │▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░                             56
>         1480 │▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░                          43
>         1730 │▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░                      50
>         1980 │▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░                   31
>         2230 │▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░                  23
>         2480 │▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░                15
>         2730 │▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░               23
>         2980 │▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░             20
>         3230 │▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░            14
>         3480 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░            4
>         3730 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░            8
>         3980 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░           9
>         4230 │░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░           4

Cool graphs!


>
>At the frequency of the laptop during the bench (~ 2.3 GHz), this is
>about a 130 ns difference on the median value and 50 ns on the minimal
>value.
>
>A next step would be to collapse local and main tables, as in
>0ddcf43d5d4a (ipv4: FIB Local/MAIN table collapse).
>
>[1]: https://github.com/vincentbernat/network-lab/blob/master/lab-routes-ipv6/kbench_mod.c
>
>Signed-off-by: Vincent Bernat <vincent@...nat.im>

Reviewed-by: Jiri Pirko <jiri@...lanox.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ