diff options
author | 2022-09-17 20:07:12 -0700 | |
---|---|---|
committer | 2022-09-26 12:19:12 -0700 | |
commit | 24291caf8447f6fc060c8d00136bdc30ee207f38 (patch) | |
tree | 13d0a9d2b34cc58777852bce8ed9732c3882e669 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | lib/bitmap: don't call __bitmap_weight() in kernel code (diff) | |
download | linux-dev-24291caf8447f6fc060c8d00136bdc30ee207f38.tar.xz linux-dev-24291caf8447f6fc060c8d00136bdc30ee207f38.zip |
lib/bitmap: add bitmap_weight_and()
The function calculates Hamming weight of (bitmap1 & bitmap2). Now we
have to do like this:
tmp = bitmap_alloc(nbits);
bitmap_and(tmp, map1, map2, nbits);
weight = bitmap_weight(tmp, nbits);
bitmap_free(tmp);
This requires additional memory, adds pressure on alloc subsystem, and
way less cache-friendly than just:
weight = bitmap_weight_and(map1, map2, nbits);
The following patches apply it for cpumask functions.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions