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

Keith Busch kbusch at kernel.org
Tue Jul 14 20:46:43 EDT 2020


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.



More information about the Linux-nvme mailing list