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

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

 



On 5/29/20 2:20 AM, Matthew Wilcox wrote:
On Thu, May 28, 2020 at 10:58:31PM +0200, Hannes Reinecke wrote:
On 5/28/20 8:54 PM, Matthew Wilcox wrote:
On Thu, May 28, 2020 at 01:50:02PM -0400, Douglas Gilbert wrote:
On 2020-05-28 12:36 p.m., Hannes Reinecke wrote:
Use xarray for device lookup by target. LUNs below 256 are linear,
and can be used directly as the index into the xarray.
LUNs above 256 have a distinct LUN format, and are not necessarily
linear. They'll be stored in indices above 256 in the xarray, with
the next free index in the xarray.

I don't understand why you think this is an improvement over just
using an allocating XArray for all LUNs.  It seems like more code,
and doesn't actually save you any storage space ... ?

The LUN range is 64 bit.
I was under the impression that xarray can only handle up to unsigned long;
which probably would work for 64bit systems, but there _are_ users running
on 32 bit, and they get patently unhappy when we have to tell them 'sorry,
not for you'.

I meant just use xa_alloc() for everything instead of using xa_insert for
0-255.

But then I'll have to use xa_find() to get to the actual element as the 1:1 mapping between SCSI LUN and array index is lost. And seeing that most storage arrays will expose only up to 256 LUNs I thought this was a good improvement on lookup. Of course, this only makes sense if xa_load() is more efficient than xa_find(). If not then of course it's a bit futile.

Cheers,

Hannes
--
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@xxxxxxx                               +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[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