Re: Scatter-gather segment merges by IOMMU?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stefan Richter
Date: Friday, August 8, 2008 - 2:21 pm

Grant Grundler wrote:

Well, I'm just doing my homework and am tracking down the various 
dma_map_sg implementations.

Here is what PPC does:
http://lxr.linux.no/linux+v2.6.26/arch/powerpc/kernel/iommu.c#L270

It looks at dma_get_max_seg_size(dev); and then merges according to it.

That's all nice and well, but in my case (FireWire storage protocol 
a.k.a. SBP-2, which is basically remote DMA), the max_segment_size of 
the PCI device is different from the size limit of the protocol.  We 
currently have to deconstruct such merges in the sbp2 drivers again:
http://lxr.linux.no/linux+v2.6.26/drivers/firewire/fw-sbp2.c#L1384

Either I keep it that way, or I let the protocol driver manipulate the 
FireWire controller's dev->dma_parms->max_segment_size (via 
dma_set_max_seg_size() of course), which is not entirely correct.

I first wanted to use blk_queue_max_segment_size(), but that falls short 
with dma_map_sg implementations like the above are at work.
-- 
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, 12:44 pm)
Re: Scatter-gather segment merges by IOMMU?, Grant Grundler, (Fri Aug 8, 1:25 pm)
Re: Scatter-gather segment merges by IOMMU?, Stefan Richter, (Fri Aug 8, 2:21 pm)
Re: Scatter-gather segment merges by IOMMU?, FUJITA Tomonori, (Fri Aug 8, 2:31 pm)
Re: Scatter-gather segment merges by IOMMU?, Stefan Richter, (Fri Aug 8, 2:58 pm)
Re: Scatter-gather segment merges by IOMMU?, FUJITA Tomonori, (Fri Aug 8, 3:17 pm)
[PATCH] ieee1394: sbp2: enforce s/g segment size limit, Stefan Richter, (Sat Aug 9, 11:20 am)
[PATCH] firewire: fw-sbp2: enforce s/g segment size limit, Stefan Richter, (Sat Aug 9, 11:21 am)
Re: [PATCH] ieee1394: sbp2: enforce s/g segment size limit, Grant Grundler, (Tue Aug 12, 10:04 am)
Re: [PATCH] ieee1394: sbp2: enforce s/g segment size limit, FUJITA Tomonori, (Tue Aug 12, 4:44 pm)