]> www.infradead.org Git - users/jedix/linux-maple.git/commit
debugobjects: Reduce parallel pool fill attempts
authorZhen Lei <thunder.leizhen@huawei.com>
Mon, 7 Oct 2024 16:50:03 +0000 (18:50 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 15 Oct 2024 15:30:31 +0000 (17:30 +0200)
commitd8c6cd3a5c8008f5d42c7763a93b43d7f3a40e94
tree88001d190d36eef0225df179ae9d7edd8f6a9d0c
parent661cc28b523d4616a322c8f82f06ec7880192060
debugobjects: Reduce parallel pool fill attempts

The contention on the global pool_lock can be massive when the global pool
needs to be refilled and many CPUs try to handle this.

Address this by:

  - splitting the refill from free list and allocation.

    Refill from free list has no constraints vs. the context on RT, so
    it can be tried outside of the RT specific preemptible() guard

  - Let only one CPU handle the free list

  - Let only one CPU do allocations unless the pool level is below
    half of the minimum fill level.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240911083521.2257-4-thunder.leizhen@huawei.com-
Link: https://lore.kernel.org/all/20241007164913.582118421@linutronix.de
--
 lib/debugobjects.c |   84 +++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 59 insertions(+), 25 deletions(-)
lib/debugobjects.c