diff options
author | Waiman Long <[email protected]> | 2019-05-20 10:14:46 -0400 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2019-06-14 14:51:14 +0200 |
commit | d86998b17a01050c0232231fa481e65ef8171ca6 (patch) | |
tree | 8191c4bac926b9793979b647c8ab328b3fb7a7d4 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | fecb0d95cdf752836cafdfffc1661f61ba4e2101 (diff) |
debugobjects: Add percpu free pools
When a multi-threaded workload does a lot of small memory object
allocations and deallocations, it may cause the allocation and freeing of
many debug objects. This will make the global pool_lock a bottleneck in the
performance of the workload. Since interrupts are disabled when acquiring
the pool_lock, it may even cause hard lockups to happen.
To reduce contention of the global pool_lock, add a percpu debug object
free pool that can be used to buffer some of the debug object allocation
and freeing requests without acquiring the pool_lock. Each CPU will now
have a percpu free pool that can hold up to a maximum of 64 debug
objects. Allocation and freeing requests will go to the percpu free pool
first. If that fails, the pool_lock will be taken and the global free pool
will be used.
The presence or absence of obj_cache is used as a marker to see if the
percpu cache should be used.
Signed-off-by: Waiman Long <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Yang Shi <[email protected]>
Cc: "Joel Fernandes (Google)" <[email protected]>
Cc: Qian Cai <[email protected]>
Cc: Zhong Jiang <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions