[ovs-git] [openvswitch/ovs] 76adea: lib/util.c: Optimise bitwise_rscan.

GitHub noreply at github.com
Wed Mar 23 20:00:19 UTC 2016

  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 76adea871d0d76674a5e030c83c7edc8d6b37e7d
  Author: Han Zhou <zhouhan at gmail.com>
  Date:   2016-03-23 (Wed, 23 Mar 2016)

  Changed paths:
    M lib/util.c
    M tests/library.at
    M tests/test-util.c

  Log Message:
  lib/util.c: Optimise bitwise_rscan.

bitwise_rscan() is found to be hot spot in ovn-controller during OVN
scalability tests. It is triggered by lflow_run() when processing
lflow updates from SB ovsdb. The perf result shows:

+  35.90%  ovn-controller  ovn-controller      [.] bitwise_rscan
+  13.39%  ovn-controller  [kernel.kallsyms]   [k] 0xffffffff8104f45a
+   5.02%  ovn-controller  libc-2.19.so        [.] _int_malloc
+   3.47%  ovn-controller  libc-2.19.so        [.] _int_free

After optimization, bitwise_rscan percentage dropped from 36% to less
than 6%:

+  11.34%  ovn-controller  [kernel.kallsyms]   [k] 0xffffffff8104f45a
+   8.15%  ovn-controller  libc-2.19.so        [.] _int_malloc
+   5.77%  ovn-controller  ovn-controller      [.] bitwise_rscan
+   5.49%  ovn-controller  libc-2.19.so        [.] _int_free

Signed-off-by: Han Zhou <zhouhan at gmail.com>
[blp at ovn.org enhanced the test]
Signed-off-by: Ben Pfaff <blp at ovn.org>

More information about the git mailing list