diff options
| author | Chengming Zhou <[email protected]> | 2024-02-16 08:55:05 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-03-04 17:01:13 -0800 |
| commit | 94ace3fec8477f8a46d08fc57cd1dd5efbd0a32b (patch) | |
| tree | ac179b460545096cbd441a2c165260f6ed5d83c5 /tools/perf/scripts/python/bin | |
| parent | bf9b7df23cb3c03d8cdbcaa58817e60ce06105ac (diff) | |
mm/zswap: change zswap_pool kref to percpu_ref
All zswap entries will take a reference of zswap_pool when zswap_store(),
and drop it when free. Change it to use the percpu_ref is better for
scalability performance.
Although percpu_ref use a bit more memory which should be ok for our use
case, since we almost have only one zswap_pool to be using. The
performance gain is for zswap_store/load hotpath.
Testing kernel build (32 threads) in tmpfs with memory.max=2GB. (zswap
shrinker and writeback enabled with one 50GB swapfile, on a 128 CPUs
x86-64 machine, below is the average of 5 runs)
mm-unstable zswap-global-lru
real 63.20 63.12
user 1061.75 1062.95
sys 268.74 264.44
[[email protected]: fix zswap_pools_lock usages after changing to percpu_ref]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Chengming Zhou <[email protected]>
Reviewed-by: Nhat Pham <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Yosry Ahmed <[email protected]>
Cc: Chengming Zhou <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions