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]
Message-ID: <20190613081152.GC2254@nanopsycho.orion>
Date:   Thu, 13 Jun 2019 10:11:52 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     netdev@...r.kernel.org
Cc:     vladbu@...lanox.com, pablo@...filter.org, xiyou.wangcong@...il.com,
        jhs@...atatu.com, mlxsw@...lanox.com, alexanderk@...lanox.com,
        pabeni@...hat.com
Subject: Re: tc tp creation performance degratation since kernel 5.1

I made a mistake during measurements, sorry about that.

This is the correct script:
-----------------------------------------------------------------------
#!/bin/bash

dev=testdummy
ip link add name $dev type dummy
ip link set dev $dev up
tc qdisc add dev $dev ingress

tmp_file_name=$(date +"/tmp/tc_batch.%s.%N.tmp")
pref_id=1

while [ $pref_id -lt 20000 ]
do
        echo "filter add dev $dev ingress proto ip pref $pref_id flower action drop" >> $tmp_file_name
        #echo "filter add dev $dev ingress proto ip pref $pref_id matchall action drop" >> $tmp_file_name
        ((pref_id++))
done

start=$(date +"%s")
tc -b $tmp_file_name
stop=$(date +"%s")
echo "Insertion duration: $(($stop - $start)) sec"
rm -f $tmp_file_name

ip link del dev $dev
-----------------------------------------------------------------------

Note the commented out matchall. I don't see the regression with
matchall. However, I see that with flower:
kernel 5.1
Insertion duration: 4 sec
kernel 5.2
Insertion duration: 163 sec

I don't see any significant difference in perf:
kernel 5.1
    77.24%  tc               [kernel.vmlinux]    [k] tcf_chain_tp_find
     1.67%  tc               [kernel.vmlinux]    [k] mutex_spin_on_owner
     1.44%  tc               [kernel.vmlinux]    [k] _raw_spin_unlock_irqrestore
     0.93%  tc               [kernel.vmlinux]    [k] idr_get_free
     0.79%  tc_pref_scale_o  [kernel.vmlinux]    [k] do_syscall_64
     0.69%  tc               [kernel.vmlinux]    [k] finish_task_switch
     0.53%  tc               libc-2.28.so        [.] __memset_sse2_unaligned_erms
     0.49%  tc               [kernel.vmlinux]    [k] __memset
     0.36%  tc_pref_scale_o  libc-2.28.so        [.] malloc
     0.30%  tc_pref_scale_o  libc-2.28.so        [.] _int_free
     0.24%  tc               [kernel.vmlinux]    [k] __memcpy
     0.23%  tc               [cls_flower]        [k] fl_change
     0.23%  tc               [kernel.vmlinux]    [k] __nla_validate_parse
     0.22%  tc               [kernel.vmlinux]    [k] __slab_alloc


    75.57%  tc               [kernel.kallsyms]  [k] tcf_chain_tp_find
     2.70%  tc               [kernel.kallsyms]  [k] _raw_spin_unlock_irqrestore
     1.13%  tc_pref_scale_o  [kernel.kallsyms]  [k] do_syscall_64
     0.87%  tc               libc-2.28.so       [.] __memset_sse2_unaligned_erms
     0.86%  ip               [kernel.kallsyms]  [k] finish_task_switch
     0.67%  tc               [kernel.kallsyms]  [k] memset
     0.63%  tc               [kernel.kallsyms]  [k] mutex_spin_on_owner
     0.52%  tc_pref_scale_o  libc-2.28.so       [.] malloc
     0.48%  tc               [kernel.kallsyms]  [k] idr_get_free
     0.46%  tc               [kernel.kallsyms]  [k] fl_change
     0.42%  tc_pref_scale_o  libc-2.28.so       [.] _int_free
     0.35%  tc_pref_scale_o  libc-2.28.so       [.] __GI___strlen_sse2
     0.35%  tc_pref_scale_o  libc-2.28.so       [.] __mbrtowc
     0.34%  tc_pref_scale_o  libc-2.28.so       [.] __fcntl64_nocancel_adjusted

Any ideas?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ