diff options
author | Waiman Long <longman@redhat.com> | 2019-05-20 10:14:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-06-14 14:51:14 +0200 |
commit | d86998b17a01050c0232231fa481e65ef8171ca6 (patch) | |
tree | 8191c4bac926b9793979b647c8ab328b3fb7a7d4 /.cocciconfig | |
parent | fecb0d95cdf752836cafdfffc1661f61ba4e2101 (diff) | |
download | linux-d86998b17a01050c0232231fa481e65ef8171ca6.tar.bz2 |
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 <longman@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Yang Shi <yang.shi@linux.alibaba.com>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: Qian Cai <cai@gmx.us>
Cc: Zhong Jiang <zhongjiang@huawei.com>
Link: https://lkml.kernel.org/r/20190520141450.7575-2-longman@redhat.com
Diffstat (limited to '.cocciconfig')
0 files changed, 0 insertions, 0 deletions