WDF Common Buffer

Hi,

I am using WdfCommonBufferCreate for storing scatter gather lists that the
device can access at a later stage. The size of the common buffer can be
big, and is in the order of 1MB. It seems to allocate the memory, however
sometimes it takes a rather long time to allocate. I’m almost positive it
might be related to the Common buffer though it could well be a
synchronization issue.

My question is : Is it possible that the WdfCommonBufferCreate could take
long depending on the size of the memory, or if system memory is fragmented?

thanks,
Ashok Bruno

Yes, the OS may have to reclaim physical pages to provide you one
physically continuously buffer and that reclamation can take time.
Hopefully you are using the OS abstractions to build the SG lists and
not building those on your own.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ashok Bruno
Sent: Wednesday, August 08, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDF Common Buffer

Hi,

I am using WdfCommonBufferCreate for storing scatter gather lists that
the
device can access at a later stage. The size of the common buffer can be

big, and is in the order of 1MB. It seems to allocate the memory,
however
sometimes it takes a rather long time to allocate. I’m almost positive
it
might be related to the Common buffer though it could well be a
synchronization issue.

My question is : Is it possible that the WdfCommonBufferCreate could
take
long depending on the size of the memory, or if system memory is
fragmented?

thanks,
Ashok Bruno


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

yup. I am using the DmaTransaction funtions in the WDF.

How much time are we talking about??

Is there a way to get scatter gather lists into non paged memory which are
aligned to a scatter gather list. ie. one scatter gather list structure is
always in physically contiguous memory that the hardware can access??

My structure in hardware looks like this…

typedef struct _SGTableElement
{
UINT64 ui64Address;
UINT32 uiCount;
UINT64 ui64NextSGTableElement;
} SGTableElement, *PSGTableElement;

Ashok

“Doron Holan” wrote in message
news:xxxxx@ntdev…
Yes, the OS may have to reclaim physical pages to provide you one
physically continuously buffer and that reclamation can take time.
Hopefully you are using the OS abstractions to build the SG lists and
not building those on your own.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ashok Bruno
Sent: Wednesday, August 08, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDF Common Buffer

Hi,

I am using WdfCommonBufferCreate for storing scatter gather lists that
the
device can access at a later stage. The size of the common buffer can be

big, and is in the order of 1MB. It seems to allocate the memory,
however
sometimes it takes a rather long time to allocate. I’m almost positive
it
might be related to the Common buffer though it could well be a
synchronization issue.

My question is : Is it possible that the WdfCommonBufferCreate could
take
long depending on the size of the memory, or if system memory is
fragmented?

thanks,
Ashok Bruno


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I don’t think there is any guarantees of how long it will take.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ashok Bruno
Sent: Wednesday, August 08, 2007 1:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] WDF Common Buffer

yup. I am using the DmaTransaction funtions in the WDF.

How much time are we talking about??

Is there a way to get scatter gather lists into non paged memory which
are
aligned to a scatter gather list. ie. one scatter gather list structure
is
always in physically contiguous memory that the hardware can access??

My structure in hardware looks like this…

typedef struct _SGTableElement
{
UINT64 ui64Address;
UINT32 uiCount;
UINT64 ui64NextSGTableElement;
} SGTableElement, *PSGTableElement;

Ashok

“Doron Holan” wrote in message
news:xxxxx@ntdev…
Yes, the OS may have to reclaim physical pages to provide you one
physically continuously buffer and that reclamation can take time.
Hopefully you are using the OS abstractions to build the SG lists and
not building those on your own.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ashok Bruno
Sent: Wednesday, August 08, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDF Common Buffer

Hi,

I am using WdfCommonBufferCreate for storing scatter gather lists that
the
device can access at a later stage. The size of the common buffer can be

big, and is in the order of 1MB. It seems to allocate the memory,
however
sometimes it takes a rather long time to allocate. I’m almost positive
it
might be related to the Common buffer though it could well be a
synchronization issue.

My question is : Is it possible that the WdfCommonBufferCreate could
take
long depending on the size of the memory, or if system memory is
fragmented?

thanks,
Ashok Bruno


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Interesting… I added another 1GB RAM to the system and the problem is
gone.

However about the other question?

“Is there a way to get scatter gather lists into non paged memory which are
aligned to a scatter gather list. ie. one scatter gather list structure
is always in physically contiguous memory that the hardware can access??”

Ashok

“Doron Holan” wrote in message
news:xxxxx@ntdev…
I don’t think there is any guarantees of how long it will take.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ashok Bruno
Sent: Wednesday, August 08, 2007 1:07 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] WDF Common Buffer

yup. I am using the DmaTransaction funtions in the WDF.

How much time are we talking about??

Is there a way to get scatter gather lists into non paged memory which
are
aligned to a scatter gather list. ie. one scatter gather list structure
is
always in physically contiguous memory that the hardware can access??

My structure in hardware looks like this…

typedef struct _SGTableElement
{
UINT64 ui64Address;
UINT32 uiCount;
UINT64 ui64NextSGTableElement;
} SGTableElement, *PSGTableElement;

Ashok

“Doron Holan” wrote in message
news:xxxxx@ntdev…
Yes, the OS may have to reclaim physical pages to provide you one
physically continuously buffer and that reclamation can take time.
Hopefully you are using the OS abstractions to build the SG lists and
not building those on your own.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ashok Bruno
Sent: Wednesday, August 08, 2007 12:45 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WDF Common Buffer

Hi,

I am using WdfCommonBufferCreate for storing scatter gather lists that
the
device can access at a later stage. The size of the common buffer can be

big, and is in the order of 1MB. It seems to allocate the memory,
however
sometimes it takes a rather long time to allocate. I’m almost positive
it
might be related to the Common buffer though it could well be a
synchronization issue.

My question is : Is it possible that the WdfCommonBufferCreate could
take
long depending on the size of the memory, or if system memory is
fragmented?

thanks,
Ashok Bruno


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer