From: Maxim S. Shatskih on
> My question is thus : does the DmaAdapter object perform any DMA-related
> action beneath any call to GetScatterGatherList, and does it require the
> underlying hardware to be SG-able

Depends on how IoGetDmaAdapter was called.

If DEVICE_DESCRIPTION::ScatterGather was set to FALSE, then the adapter object will allocate temp contiguous buffer ("bounce buffer") and copy all data to it itself.

Otherwise, it will produce non-contiguous SGLs.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Maxim S. Shatskih on
> This - extra copy to common buffer - is especially what I need to get rid
> of, for performances reason, because I am dealing with very high throughput
> data (around 600MB/sec)

Do you really think that the hardware uncapable of scatter-gather DMA can handle such a rate?

Your last resort is to build a SGL, and run DMA over each SGL entry separately, with an interrupt in the end of each SGL entry.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Olivier on
Dear Maxim,

"Maxim S. Shatskih" wrote:

> > This - extra copy to common buffer - is especially what I need to get rid
> > of, for performances reason, because I am dealing with very high throughput
> > data (around 600MB/sec)
> Do you really think that the hardware uncapable of scatter-gather DMA can handle such a rate?

Yes. Our product - a four-channel digital HD video ingest and playout card -
currently runs 400-800MB/sec (depending on the platform) using burst-mode DMA
transfers and a common buffer.
But in certain applications - DirectX ones - we need to find a way to avoid
copies between DX surfaces and our common buffer. That's the purpose.

> Your last resort is to build a SGL, and run DMA over each SGL entry separately, with an interrupt in the end of each SGL entry.

That is exactly what I try to do, expecting that the memory under the DX
surface is not too fragmented.

After some tries, I encountered another problem : when trying to
CalculateScatterGatherList for the buffer, I obtain a
STATUS_INSUFFICIENT_RESOURCES error code, probably because the system only
gave 3 map registers to my driver in IoGetDmaAdapter.
Any way to override that?

Thanks,

Olivier

From: Maxim S. Shatskih on
> STATUS_INSUFFICIENT_RESOURCES error code, probably because the system only
> gave 3 map registers to my driver in IoGetDmaAdapter.
> Any way to override that?

What is your DEVICE_DESCRIPTION?

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Tim Roberts on
Olivier <o.antoine(a)discussions.microsoft.com> wrote:
>
>Yes. Our product - a four-channel digital HD video ingest and playout card -
>currently runs 400-800MB/sec (depending on the platform) using burst-mode DMA
>transfers and a common buffer.

What kind of card is this? PCIExpress 16-lane?
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.