diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-10-13 21:45:57 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-10-15 18:30:33 +0300 |
commit | ff8d523cc4520a5ce86cde0fd57c304e2b4f61b3 (patch) | |
tree | 9c4775caac92aa7d5d2f52a11ba88c76a729ca69 /tools/perf/scripts/python/flamegraph.py | |
parent | 13f9ca723900ae3ae8e0a1e76ba86e7786e60645 (diff) | |
download | linux-ff8d523cc4520a5ce86cde0fd57c304e2b4f61b3.tar.xz |
debugobjects: Track object usage to avoid premature freeing of objects
The freelist is freed at a constant rate independent of the actual usage
requirements. That's bad in scenarios where usage comes in bursts. The end
of a burst puts the objects on the free list and freeing proceeds even when
the next burst which requires objects started again.
Keep track of the usage with a exponentially wheighted moving average and
take that into account in the worker function which frees objects from the
free list.
This further reduces the kmem_cache allocation/free rate for a full kernel
compile:
kmem_cache_alloc() kmem_cache_free()
Baseline: 225k 173k
Usage: 170k 117k
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/all/87bjznhme2.ffs@tglx
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions