diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2022-04-24 07:10:21 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2022-04-25 23:24:16 +0200 |
commit | 93bc2e9e943d20a51473a49009db3243de6e098d (patch) | |
tree | 915b2331f2e30255bb4862a4949831a21669082d /tools/laptop | |
parent | libbpf: Remove unnecessary type cast (diff) | |
download | linux-93bc2e9e943d20a51473a49009db3243de6e098d.tar.xz linux-93bc2e9e943d20a51473a49009db3243de6e098d.zip |
bpftool, musl compat: Replace nftw with FTW_ACTIONRETVAL
musl nftw implementation does not support FTW_ACTIONRETVAL. There have been
multiple attempts at pushing the feature in musl upstream, but it has been
refused or ignored all the times:
https://www.openwall.com/lists/musl/2021/03/26/1
https://www.openwall.com/lists/musl/2022/01/22/1
In this case we only care about /proc/<pid>/fd/<fd>, so it's not too difficult
to reimplement directly instead, and the new implementation makes 'bpftool perf'
slightly faster because it doesn't needlessly stat/readdir unneeded directories
(54ms -> 13ms on my machine).
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20220424051022.2619648-4-asmadeus@codewreck.org
Diffstat (limited to 'tools/laptop')
0 files changed, 0 insertions, 0 deletions