Re: DISABLE_CLUSTERING in scsi drivers

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

 



On 11/26/18 10:46 AM, Finn Thain wrote:
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?).

Well, that lone 'kmap' is due to a quirk/errata in the datasheet; essentially we have to PIO a lone byte out of the FIFO to clear it up.
And this byte is technically still part of the SCSI data, so we need to
stuff it onto the end of the actual data sg list. Which is what the kmap() thingie does.
So it really shouldn't be affected by the clustering algorithm.

Cheers,

Hannes



[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