Re: [PATCH v3 3/3] debugobjects: Reduce contention on pool lock in fill_pool()

From: Thomas Gleixner
Date: Mon Oct 07 2024 - 10:05:21 EST


On Wed, Sep 11 2024 at 16:35, Zhen Lei wrote:
> + /*
> + * Avoid allocation and lock contention when another CPU is already
> + * in the allocation path.
> + */
> + if (atomic_read(&cpus_allocating))
> + return;

Hmm. I really don't want to rely on a single CPU doing allocations in
case that the pool level reached a critical state. That CPU might be
scheduled out and all others are consuming objects up to the point where
the pool becomes empty.

Let me integrate this into the series I'm going to post soon.

Thanks,

tglx