[PATCH v3 09/30] block: Pre-allocate zone write plugs
Damien Le Moal
dlemoal at kernel.org
Wed Mar 27 23:33:13 PDT 2024
On 3/28/24 15:22, Christoph Hellwig wrote:
> On Thu, Mar 28, 2024 at 03:18:46PM +0900, Damien Le Moal wrote:
>>> Yes, bt it can use kfree_rcu which doesn't need the rcu_head in the
>>> zwplug.
>>
>> Unfortunately, it does. kfree_rcu() is a 2 argument macro: address and rcu head
>> to use... The only thing we could drop from the plug struct is the gendisk pointer.
>
> It used to have a one argument version. Oh, that recently got renamed
> to kfree_rcu_mightsleep. Which seems like a somewhat odd name, but
> it's still there and what i meant.
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...
--
Damien Le Moal
Western Digital Research
More information about the Linux-nvme
mailing list