I am planning to port an existing custom device and driver from 32-bit Windows XP to one of the 64-bit Windows platforms: XP or Server 2003, not Vista. The device already supports 64-bit addresses and buffer lengths. The new Windows platform will have at least 64GB of memory installed on it, but more likely 128GB. I would like the device’s driver to allocate 30GB to 50GB in one chunk to provide to the device. The device currently gets three 128MB chunks under 32-bit Windows XP from AllocateCommonBuffer. No, the device does not support scatter/gather. Will the driver have any problem doing this on a 64-bit Windows platform?
The driver can also map this buffer or buffers into a process’s virtual address space. Can I anticipate any problem in trying to map a 30GB to 50GB buffer into a process’s address space in 64-bit Windows.
In doing this mapping, the driver uses one or more linked MDLs to describe a buffer. Does the size of a MDL change in going from 32-bit to 64-bit Windows?
----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Monday, March 26, 2007 11:34 AM
Subject: [ntdev] large memory allocation and mapping on 64-bit Windows
platforms
>I am planning to port an existing custom device and driver from 32-bit
>Windows XP to one of the 64-bit Windows platforms: XP or Server 2003, not
>Vista. The device already supports 64-bit addresses and buffer lengths.
>The new Windows platform will have at least 64GB of memory installed on it,
>but more likely 128GB. I would like the device’s driver to allocate 30GB
>to 50GB in one chunk to provide to the device. The device currently gets
>three 128MB chunks under 32-bit Windows XP from AllocateCommonBuffer. No,
>the device does not support scatter/gather. Will the driver have any
>problem doing this on a 64-bit Windows platform?
>
> The driver can also map this buffer or buffers into a process’s virtual
> address space. Can I anticipate any problem in trying to map a 30GB to
> 50GB buffer into a process’s address space in 64-bit Windows.
Can I ask you one question: what kind of device needs 30GB of contiguous DMA
memory for proper operation?
GV
>
> In doing this mapping, the driver uses one or more linked MDLs to describe
> a buffer. Does the size of a MDL change in going from 32-bit to 64-bit
> Windows?
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
Signore Varenni:
A CT scanner with a large detector panel can easily generate 30GB of data for certain procedures.
----- Original Message -----
From:
To: “Windows System Software Devs Interest List”
Sent: Monday, March 26, 2007 12:48 PM
Subject: RE:[ntdev] large memory allocation and mapping on 64-bit Windows
platforms
> Signore Varenni:
>
> A CT scanner with a large detector panel can easily generate 30GB of data
> for certain procedures.
Well, even if the generated data is 30+ GB, it doesn’t mean that the data
should be transferred within a single data transfer. Regarding allocating
such huge amount of memory, I had a quick look at the documnetation of
AllocateCommonBuffer and similar, and you cannot allocate more that 4GB
(less? the length is in any case a ULONG). Same for MDLs.
My suggestion would be to revise the HW design if possible and split the
data transfer from the hw into multiple chunks.
Then, this is just my humble opinion.
Have a nice day
GV
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
Look in the docs for MmAllocatePagesForMdl. This just allocates the physical
pages for use by your adapter. You will have to map it to your prcess
address space with a call to MmMapLockedPagesSpecifyCache. I haven’t worked
with a system with that much memory, so I can’t say whether there are any
limitations on mapping that much space into a process’ virtual address space
or not. Fragmentation is an issue, so you would need to allocate this memory
in the driver “at the dawn of time” and hold onto it.
Beverly
wrote in message news:xxxxx@ntdev…
>I am planning to port an existing custom device and driver from 32-bit
>Windows XP to one of the 64-bit Windows platforms: XP or Server 2003, not
>Vista. The device already supports 64-bit addresses and buffer lengths.
>The new Windows platform will have at least 64GB of memory installed on it,
>but more likely 128GB. I would like the device’s driver to allocate 30GB
>to 50GB in one chunk to provide to the device. The device currently gets
>three 128MB chunks under 32-bit Windows XP from AllocateCommonBuffer. No,
>the device does not support scatter/gather. Will the driver have any
>problem doing this on a 64-bit Windows platform?
>
> The driver can also map this buffer or buffers into a process’s virtual
> address space. Can I anticipate any problem in trying to map a 30GB to
> 50GB buffer into a process’s address space in 64-bit Windows.
>
> In doing this mapping, the driver uses one or more linked MDLs to describe
> a buffer. Does the size of a MDL change in going from 32-bit to 64-bit
> Windows?
>