Hello ,
i am trying to send very big files of MBs through DMA , i begin from
application till DMA Driver and use DeviceioControl function with input
size data = 32kb .
for example if i want to send file of 1 mb , i divide it into several
packets of each = 32kb and for each packet i send it via deviceiocontrol
function.
Myquestion is , is there a better approach since i am getting very bad
performance data rate ?
how would you send such big file to DMA in such case ?
pseudo code is :
for (each packet of 32kb in our big file)
{
DeviceIOControl (hdmadevice , IOCode , myPacket which is 32kb
,…)
}
Thanks
–
Mohamed Abdel Rauof.
communication and electronics Engineer Cairo University BSc. 2011.
First question: Why use such small packets? Why not send 1MB at a time?
Peter
OSR
@OSRDrivers
HW limitation at reciever driver
On Feb 6, 2017 1:26 AM, wrote:
First question: Why use such small packets? Why not send 1MB at a time?
Peter
OSR
@OSRDrivers
—
NTDEV is sponsored by OSR
Visit the list online at: http:>
MONTHLY seminars on crash dump analysis, WDF, Windows internals and
software drivers!
Details at http:
To unsubscribe, visit the List Server section of OSR Online at <
http://www.osronline.com/page.cfm?name=ListServer></http:></http:>
On Feb 5, 2017, at 8:07 PM, mohamed rauof wrote:
>
> HW limitation at reciever driver
Still, you can send the 1MB in one DeviceIoControl call and chop it up in kernel. That way, it only gets locked and mapped once.
—
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
but i heard that maximum buffer size of one deviceIOControl request buffer
is depending on page of memory which is several KBs , i am not sure of that
. are there any refrances for that info ?
@Tim Roberts , thanks alot for your appreciated help !
On Mon, Feb 6, 2017 at 7:51 AM, Tim Roberts wrote:
> On Feb 5, 2017, at 8:07 PM, mohamed rauof
> wrote:
> >
> > HW limitation at reciever driver
>
> Still, you can send the 1MB in one DeviceIoControl call and chop it up in
> kernel. That way, it only gets locked and mapped once.
> —
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:> showlists.cfm?list=ntdev>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer>
>
–
Mohamed Abdel Rauof.
communication and electronics Engineer Cairo University BSc. 2011.</http:></http:>
It’s meaningful for Windows XP, the maximum IO buffer size in this case
defines/limited by the following equation: PAGE_SIZE * (65535 -
sizeof(MDL)) / sizeof(ULONG_PTR))).
And yes, in result of calculation you’ll get the value a bit less than 64K.
But for Windows 7 and later OS versions this limit has been extended,
namely: 4 * 1024 * 1024 * 1024LL - PAGE_SIZE.
Therefore, if the target OS version in your case Windows 7 or later, it’s
shouldn’t disturb you.
Best Regards,
Dzmitry
On Mon, Feb 6, 2017 at 9:21 AM, mohamed rauof
wrote:
> but i heard that maximum buffer size of one deviceIOControl request buffer
> is depending on page of memory which is several KBs , i am not sure of that
> . are there any refrances for that info ?
> @Tim Roberts , thanks alot for your appreciated help !
>
> On Mon, Feb 6, 2017 at 7:51 AM, Tim Roberts wrote:
>
>> On Feb 5, 2017, at 8:07 PM, mohamed rauof
>> wrote:
>> >
>> > HW limitation at reciever driver
>>
>> Still, you can send the 1MB in one DeviceIoControl call and chop it up in
>> kernel. That way, it only gets locked and mapped once.
>> —
>> Tim Roberts, xxxxx@probo.com
>> Providenza & Boekelheide, Inc.
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> Visit the list online at: http:>> lists.cfm?list=ntdev>
>>
>> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
>> software drivers!
>> Details at http:
>>
>> To unsubscribe, visit the List Server section of OSR Online at <
>> http://www.osronline.com/page.cfm?name=ListServer>
>>
>
>
>
> –
> Mohamed Abdel Rauof.
> communication and electronics Engineer Cairo University BSc. 2011.
> — NTDEV is sponsored by OSR Visit the list online at: MONTHLY seminars
> on crash dump analysis, WDF, Windows internals and software drivers!
> Details at To unsubscribe, visit the List Server section of OSR Online at</http:></http:>
mohamed rauof wrote:
but i heard that maximum buffer size of one deviceIOControl request
buffer is depending on page of memory which is several KBs , i am not
sure of that . are there any refrances for that info ?
Only indirectly, as Dmitry pointed out. A page is 4KB. In the older
systems (prior to Vista), DeviceIoControl is limited to a single MDL,
which could only contain just over 16,000 page entries, which comes to
64MB. In Vista and beyond, the limit is several gigabytes.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
I apologize for typo, the limitation for Windows XP is less than 64MB not
64K.
On Mon, Feb 6, 2017 at 8:54 PM, Tim Roberts wrote:
> mohamed rauof wrote:
> >
> > but i heard that maximum buffer size of one deviceIOControl request
> > buffer is depending on page of memory which is several KBs , i am not
> > sure of that . are there any refrances for that info ?
>
> Only indirectly, as Dmitry pointed out. A page is 4KB. In the older
> systems (prior to Vista), DeviceIoControl is limited to a single MDL,
> which could only contain just over 16,000 page entries, which comes to
> 64MB. In Vista and beyond, the limit is several gigabytes.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list online at: http:> showlists.cfm?list=ntdev>
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and
> software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at <
> http://www.osronline.com/page.cfm?name=ListServer>
></http:></http:>