Re: [PATCH 06/11] mempool: factor out a mempool_alloc_from_pool helper

From: Christoph Hellwig
Date: Mon Nov 24 2025 - 01:17:28 EST


On Sun, Nov 23, 2025 at 09:49:08AM -0800, Hugh Dickins wrote:
> I agree it's confusing, and calls into question whether that was a good
> refactoring.

What part is confusing?

> (I also wondered if it's right to pool->alloc before alloc from mempool
> after the wait was for a mempool element to be freed: but that's how it
> was before, and I expect it's been proved in the past that a strict
> pool->alloc before alloc from mempool is the best strategy.)

In general given how good the allocator is at satisfying small request
you might get something from the general pool quicker than the
reserved lists, especially if the io_schedule timeout hits.