Re: Scatter-gather segment merges by IOMMU?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: FUJITA Tomonori <fujita.tomonori@...>
Cc: <grundler@...>, <linux-scsi@...>, <linux-kernel@...>
Date: Friday, August 8, 2008 - 5:58 pm

FUJITA Tomonori wrote:

FireWire is a multi-protocol bus.  SBP-2 is just one of many quite 
different protocols.  SBP-2 targets read or write the initiators memory 
buffers via remote DMA.  These buffer may be exposed as s/g lists to the 
target.  The protocol limits these s/g lists to up to 65535 elements of 
up to 65535 bytes size each.

FireWire controllers on the other hand get their maximum segment size 
set to 65536 by the PCI subsystem.  (All FireWire controllers supported 
by mainline Linux are PCI or PCIe devices.)

In case of the drivers/firewire/ stack, the SBP-2 driver is currently 
the only one which uses dma_map_sg.  In case of the drivers/ieee1394/ 
stack, also the drivers for isochronous protocols, including userspace 
drivers via raw1394, use dma_map_sg.

So if the SBP-2 driver manipulated the controller device's 
max_segment_size, it would influence the DMA mappings of the other 
protocols.  It wouldn't be a big deal; the isochronous mappings could 
only be collapsed to chunks of at most 15 pages instead of 16 pages. 
However, the mapping deconstructing code in the SBP-2 drivers is not a 
big deal either.
-- 
Stefan Richter
-=====-==--- =--- -=---
http://arcgraph.de/sr/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Scatter-gather segment merges by IOMMU?, Stefan Richter, (Fri Aug 8, 3:44 pm)
Re: Scatter-gather segment merges by IOMMU?, Grant Grundler, (Fri Aug 8, 4:25 pm)
Re: Scatter-gather segment merges by IOMMU?, Stefan Richter, (Fri Aug 8, 5:21 pm)
Re: Scatter-gather segment merges by IOMMU?, FUJITA Tomonori, (Fri Aug 8, 5:31 pm)
Re: Scatter-gather segment merges by IOMMU?, Stefan Richter, (Fri Aug 8, 5:58 pm)
Re: Scatter-gather segment merges by IOMMU?, FUJITA Tomonori, (Fri Aug 8, 6:17 pm)
[PATCH] ieee1394: sbp2: enforce s/g segment size limit, Stefan Richter, (Sat Aug 9, 2:20 pm)
Re: [PATCH] ieee1394: sbp2: enforce s/g segment size limit, Grant Grundler, (Tue Aug 12, 1:04 pm)
Re: [PATCH] ieee1394: sbp2: enforce s/g segment size limit, FUJITA Tomonori, (Tue Aug 12, 7:44 pm)
[PATCH] firewire: fw-sbp2: enforce s/g segment size limit, Stefan Richter, (Sat Aug 9, 2:21 pm)