Re: DISABLE_CLUSTERING in scsi drivers

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

 



On Mon, 26 Nov 2018, Christoph Hellwig wrote:

> On Thu, Nov 22, 2018 at 09:02:13AM +1100, Finn Thain wrote:
> > > you in the To list maintain or wrote SCSI drivers that set the
> > > DISABLE_CLUSTERING flag, which basically disable merges of any
> > > bio segments.  We already have the actual max_segment size limit
> > > to say which length a segment should have, independent of merged
> > > or originally created, so this limit generally should rarely if
> > > ever be required, and mostly is an old cut an paste error.
> > > 
> > 
> > Are you referring to
> > 	blk_queue_max_segment_size(q, dma_get_max_seg_size(dev));
> > in drivers/scsi/scsi_lib.c?
> > 
> > Is the segment size limitation of the DMA controller the only reason to 
> > want DISABLE_CLUSTERING?
> 
> DISABLE_CLUSTERING mixes up two not really related things:
> 
>  1) limit the size of each segment to a single page size
>  2) limit each segment to not actually span a page boundary.
> 
> Both could be valid limit for DMA engines, but also might be particularly
> relevant for pio, if you e.g. kmap each page of a scatterlist do do
> pio you'd want to see both limits.
> 

I looked through all the drivers based on esp_scsi.c and NCR5380.c which 
use DISABLE_CLUSTERING.

There is one driver that uses DMA and sometimes kmap too, which is 
am53c974.c. It defaults to ENABLE_CLUSTERING, which would seem to be a bug 
if kmap isn't compatible with that (Hannes?).

For g_NCR5380.c (ISA bus) and dmx3191d.c (PCI bus) these drivers need 
DISABLE_CLUSTERING because apparently they don't use kmap or DMA. This 
will need to be addressed if you remove DISABLE_CLUSTERING.

Then we have the ARM drivers, cumana_1.c and oak.c. I believe that ecard 
drivers like these are only used with CONFIG_ARCH_RPC, and I think that 
would imply !CONFIG_HIGHMEM (Russell?).

m68k that doesn't seem to have CONFIG_HIGHMEM either, so no need for kmap 
or DISABLE_CLUSTERING when doing PIO or PDMA. That includes mac_esp.c and 
mac_scsi.c. Michael has already answered for atari_scsi.c.

That leaves the Sun 3 drivers, sun3_scsi.c and sun3_scsi_vme.c, which may 
have DMA limitations I don't know about (Sam?).

-- 



[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