Re: [PATCH 2/2] block/mq-deadline: fallback to per-cpu insertion buckets under contention

Jens Axboe
2024-01-18T18:28:43Z

On 1/18/24 11:25 AM, Keith Busch wrote:
> On Thu, Jan 18, 2024 at 11:04:57AM -0700, Jens Axboe wrote:
>> +#define DD_CPU_BUCKETS 32
>> +#define DD_CPU_BUCKETS_MASK (DD_CPU_BUCKETS - 1)
>
> A bit of wasted space on machines with < 32 CPUs, no? Sure, it's not
> much and the fixed size makes the implementation simpler, but these add
> up.

True, could make it allocated instead, 32 was just pulled out of thin
air. Might make sense to make the magic 8 or something instead, that's
probably Good Enough in general. Or we can make it dependent on the
number of online CPUs when initialized. Honestly just didn't want to
overcomplicate this initial RFC.

--
Jens Axboe