diff options
| author | Song Liu <songliubraving@fb.com> | 2020-10-29 10:19:25 +0300 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2020-10-30 23:03:29 +0300 |
| commit | 20b6cc34ea74b6a84599c1f8a70f3315b56a1883 (patch) | |
| tree | d3a5f38e379c3a12c5592aeec15e1806e9a26403 /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | c50eb518e262fa06bd334e6eec172eaf5d7a5bd9 (diff) | |
| download | linux-20b6cc34ea74b6a84599c1f8a70f3315b56a1883.tar.xz | |
bpf: Avoid hashtab deadlock with map_locked
If a hashtab is accessed in both non-NMI and NMI context, the system may
deadlock on bucket->lock. Fix this issue with percpu counter map_locked.
map_locked rejects concurrent access to the same bucket from the same CPU.
To reduce memory overhead, map_locked is not added per bucket. Instead,
8 percpu counters are added to each hashtab. buckets are assigned to these
counters based on the lower bits of its hash.
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201029071925.3103400-3-songliubraving@fb.com
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions
