[PATCH v3 09/30] block: Pre-allocate zone write plugs
Damien Le Moal
dlemoal at kernel.org
Wed Mar 27 23:51:09 PDT 2024
On 3/28/24 15:38, Christoph Hellwig wrote:
> On Thu, Mar 28, 2024 at 03:33:13PM +0900, Damien Le Moal wrote:
>> Ha. OK. I did not see that one. But that means that the plug kfree() can then
>> block the caller. Given that the last ref drop may happen from BIO completion
>> context (when the last write to a zone making the zone full complete), I do not
>> think we can use this function...
>
> Ah, damn. So yes, we probably still need the rcu head. We can kill
> the gendisk pointer, though. Or just stick with the existing version
> and don't bother with the micro-optimization, at which point the
> mempool might actually be the simpler implementation?
I am all for not micro-optimizing the free path right now.
I am not so sure about the mempool being simpler... And I do see some
improvements in perf for SMR HDDs with the free list. Could be noise though but
it feels a little more solid perf-wise. I have not seen any benefit for faster
devices with the free list though...
If you prefer the mempool, I can go back to using it though, not a big deal.
For other micro-optimizations worth looking at later would be to try out the new
low latency workqueues for the plug BIO work.
--
Damien Le Moal
Western Digital Research
More information about the Linux-nvme
mailing list