[PATCH V3 01/10] xarray: add __xa_load() version

Chaitanya Kulkarni Chaitanya.Kulkarni at wdc.com
Tue Jul 14 20:47:32 EDT 2020


On 7/14/20 17:46, Keith Busch wrote:
> On Tue, Jul 14, 2020 at 04:30:48PM -0700, Chaitanya Kulkarni wrote:
>> This patch adds a new xarray API __xa_load() that moves xa_load() core
>> to its low level function __xa_load(). Caller is responsible for handling
>> RCU locking. This API is needed for NVMe subsystem so that it can take
>> an advantage of the RCU locking provided by the XAarray for reference
>> counting.
> I asked last time: why is this necessary? All the docs say you can nest
> RCU read locks so what is wrong with doing the following with existing
> xa_load()?
> 
> 	rcu_read_lock()
> 	xa_load(..)
> 	do_something(..)
> 	rcu_read_unlock()
> 
> If there's nothing wrong with the above, then we shouldn't need to
> introduce a new API.
> 

I see, I'll send V4 with that.



More information about the Linux-nvme mailing list