diff options
author | David S. Miller <davem@davemloft.net> | 2015-12-29 23:13:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-29 23:13:45 +0300 |
commit | 5e7112590e7cd20f2a243c51ecd9016feb319996 (patch) | |
tree | 78d96a346886b3797d563e598dac08e18898f16b /drivers/atm | |
parent | 26a4d063b1357e3ad81b776eb89d4d82f101da2c (diff) | |
parent | 688ecfe60220516e8b6707c832ec02e92522dd85 (diff) | |
download | linux-5e7112590e7cd20f2a243c51ecd9016feb319996.tar.xz |
Merge branch 'bpf_hash-locking'
Ming Lei says:
====================
bpf: hash: use per-bucket spinlock
This patchset tries to optimize ebpf hash map, and follows
the idea:
Both htab_map_update_elem() and htab_map_delete_elem()
can be called from eBPF program, and they may be in kernel
hot path, it isn't efficient to use a per-hashtable lock
in this two helpers, so this patch converts the lock into
per-bucket spinlock.
With this patchset, looks the performance penalty from eBPF
decreased a lot, see the following test:
1) run 'tools/biolatency' of bcc before running block test;
2) run fio to test block throught over /dev/nullb0,
(randread, 16jobs, libaio, 4k bs) and the test box
is one 24cores(dual sockets) VM server:
- without patchset: 607K IOPS
- with this patchset: 1184K IOPS
- without running eBPF prog: 1492K IOPS
TODO:
- remove the per-hashtable atomic counter
V2:
- fix checking on buckets size
V1:
- fix the wrong 3/3 patch
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm')
0 files changed, 0 insertions, 0 deletions