Re: [PATCH 3/4] scsi: move target device list to xarray

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 28, 2020 at 03:44:37PM -0400, Douglas Gilbert wrote:
> > And then maybe you could make a convincing argument that the spin_lock
> > there could be turned into an xa_lock since that will prevent sdevs from
> > coming & going during the iteration of the device list.
> 
> I tried that but ran into problems. The xarray model is clear enough,
> but there is a (non-atomic) enumerated state in each sdev (struct
> scsi_device object (pointer)) that is protected by a mutex.
> I was unable to escape those pesky (but very useful) warnings out of
> the depths of xarray that the locking was awry. When I've burrowed
> into xarray.c I have usually found that it was correct. So now I regard
> it as a pesky feature :-)

Fascinating.  So much of SCSI has to be IRQ-safe, and yet you can't look
at the sdev state outside process context ...

> > This patch seems decent enough ... I just think the decision to optimise
> > the layout for LUNs < 256 is a bit odd.  But hey, your subsystem,
> > not mine.
> 
> Hannes has the most experience in that area. He has only been using xarray
> for a week or so (I think). There is something important missing from his
> patchset: any xa_destroy() calls :-)

They're not necessarily needed.  If the XArray is empty, there's nothing
to do.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux