On 1/22/24 7:30 PM, Damien Le Moal wrote: > On 1/23/24 08:53, Bart Van Assche wrote: >> Reduce lock contention on dd->lock by calling dd_insert_request() from >> inside the dispatch callback instead of from the insert callback. This >> patch is inspired by a patch from Jens. > > I supposed this is a followup of the performance discussion with Jens. If so, > can you add performance numbers here and so justifying the change ? > Otherwise, it is hard to figure out the effect of the patch and so why you are > making this change. Numbers are in here [1], I will fold them into the commit message. It's worth, as is mentioned in my commit message, that this also relies on the previous patches to get there. It just leaves the insertion side contention as the dominant one until this patch is applied. Before: Device IOPS sys contention diff ==================================================== null_blk 879K 89% 93.6% nvme0n1 901K 86% 94.5% and after this and the previous two patches: Device IOPS sys contention diff ==================================================== null_blk 2867K 11.1% ~6.0% +226% nvme0n1 3162K 9.9% ~5.0% +250% [1] https://git.kernel.dk/cgit/linux/commit/?h=block-deadline&id=678abafc92bae49e6f4a92cea05dcd5f39928054 -- Jens Axboe