On 1/23/24 11:47 AM, Bart Van Assche wrote: > On 1/23/24 09:34, Jens Axboe wrote: >> Based on the similar patch for mq-deadline, this uses separate >> insertion lists so we can defer touching dd->lock until dispatch > ^^^^^^^^ > bfqd->lock? Thanks >> with ~30% lock contention and 14.5% sys time, by applying the lessons >> learnt with scaling mq-deadline. Patch needs to be split, but it: > > Is the last sentence above perhaps incomplete? It should just be removed, it's outdated as it doesn't need splitting anymore, I already did that work. >> diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h >> index 56ff69f22163..f44f5d4ec2f4 100644 >> --- a/block/bfq-iosched.h >> +++ b/block/bfq-iosched.h >> @@ -516,10 +516,14 @@ enum { >> struct bfq_data { >> struct { >> spinlock_t lock; >> + spinlock_t insert_lock; >> } ____cacheline_aligned_in_smp; > > Can lock contention be reduced further by applying > ____cacheline_aligned_in_smp to each spinlock instead of the > surrounding struct? Same as deadline, it doesn't really matter in my testing. -- Jens Axboe