]> www.infradead.org Git - users/jedix/linux-maple.git/commit
debugobjects: Double the per CPU slots
authorThomas Gleixner <tglx@linutronix.de>
Mon, 7 Oct 2024 16:50:19 +0000 (18:50 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 15 Oct 2024 15:30:33 +0000 (17:30 +0200)
commita201a96b9682e5b42ed93108c4aeb6135c909661
tree08f23424df2e717f1c014a7022194e78b7cd96ba
parent2638345d22529cdc964d20a617bfd32d87f27e0f
debugobjects: Double the per CPU slots

In situations where objects are rapidly allocated from the pool and handed
back, the size of the per CPU pool turns out to be too small.

Double the size of the per CPU pool.

This reduces the kmem cache allocation and free operations during a kernel compile:

           alloc         free
Baseline:    380k           330k
Double size: 295k     245k

Especially the reduction of allocations is important because that happens
in the hot path when objects are initialized.

The maximum increase in per CPU pool memory consumption is about 2.5K per
online CPU, which is acceptable.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/all/20241007164914.378676302@linutronix.de
lib/debugobjects.c