Hi,
Our Win NT driver needs to do DMA to SDRAM present on a PCI card.
The DMA is done using user mode buffers and MDLs. The DMA controller
present on the PCI card (bus master DMA) is used for this purpose.
The size of each DMA is around 1MB. DMA chaining is used. Each time
IOMaptransfer is called to build the DMA chain list, it always limits
the size of the transfer to 4KB (page size on x86). Hence our loop runs
for 256 times to complete the DMA chaining for 1MB. This limits our DMA
performance on some PC architectures.
Is it possible to configure NT so that IOMapRegister gives a transfer
size that is a multiple of the page size(Eg 64K)? This would cause the
chaining loop to execute fewer times.By doing so can any performance
improvement be acheived? (Eg: Time taken to find consecutive map
registers can offset the # of times the loop is run)
Could you please help us to resolve it. Thank you in advance
Rgds,
Madhu
If you mean what I think that you mean, then you are misinforming the
IoManager/Hal about the type of DMA support your device has. It looks like
you are saying that your device supports scatter-gather DMA, but that the
max number of scatter-gather elements it can use is one. You would be better
of to indicate that you do not support scatter-gather as that will get you
64K dma buffers (at the cost of an additional memory copy.)
The other interpretation I can get from your question is that your device in
fact supports more than one scatter-gather element, but you are calling
IoMapTransfer only once per DMA operation, in which case you need to change
your set up algorithm to call IoMapTransfer repeatedly until either you fill
up all of your device scatter-gather elements or completely describe the
data buffer, and then start the dma operation.
By the way, IoMapTransfer will not always return 4K length physical
addresses, this just reflects the page size of the system and the
fragmentation of the user data buffer. Sometimes it will return larger
chunks.
-----Original Message-----
From: xxxxx@tataelxsi.co.in
[mailto:xxxxx@tataelxsi.co.in]
Sent: Tuesday, August 06, 2002 8:14 AM
To: NT Developers Interest List
Subject: [ntdev] DMA ISSUES on NT4.0
Hi,
Our Win NT driver needs to do DMA to SDRAM present on a PCI
card. The DMA is done using user mode buffers and MDLs. The
DMA controller present on the PCI card (bus master DMA) is
used for this purpose. The size of each DMA is around 1MB.
DMA chaining is used. Each time IOMaptransfer is called to
build the DMA chain list, it always limits the size of the
transfer to 4KB (page size on x86). Hence our loop runs for
256 times to complete the DMA chaining for 1MB. This limits
our DMA performance on some PC architectures.
Is it possible to configure NT so that IOMapRegister gives a
transfer size that is a multiple of the page size(Eg 64K)?
This would cause the chaining loop to execute fewer times.By
doing so can any performance improvement be acheived? (Eg:
Time taken to find consecutive map registers can offset the
of times the loop is run)
Could you please help us to resolve it. Thank you in advance
Rgds,
Madhu
You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
%%email.unsub%%
> Is it possible to configure NT so that IOMapRegister gives a
transfer
size that is a multiple of the page size(Eg 64K)?
No. Usually, IoMapTransfer just return the physical addresses of the
MDL’s pages, which can be arbitrary.
Max