[wdmaudiodev] Re: IPortWaveRTStream::AllocateContiguousPagesForMdl problem in Windows 7

  • From: "Cheng-mean Liu (SOCCER)" <soccerl@xxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 20 Mar 2009 18:41:41 -0700

Thanks for information, Jeff. 

I am able to reproduce this issue with exactly same parameter on my Win7 test 
box.

We are investigating the root cause of it. 

Stay tuned...

Thanks

Cheng-mean Liu
Microsoft

This posting is provided "AS IS" with no warranties, and confers no
rights.
-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages
Sent: Tuesday, March 17, 2009 1:49 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: IPortWaveRTStream::AllocateContiguousPagesForMdl 
problem in Windows 7

Thanks. Typically it would be:

LowerBound = 0;
UpperBound = 0xffffffffffffffffI64;
TotalBytes = 80;

Jeff

----- Original Message ----- 
From: "Cheng-mean Liu (SOCCER)" <soccerl@xxxxxxxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Tuesday, March 17, 2009 7:36 PM
Subject: [wdmaudiodev] Re: IPortWaveRTStream::AllocateContiguousPagesForMdl 
problem in Windows 7


> Hi Jeff:
>
> Could you tell me the complete parameters that you pass in when calling 
> this function?
>
> Thanks
>
> Cheng-mean Liu
> Microsoft
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> -----Original Message-----
> From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages
> Sent: Tuesday, March 17, 2009 1:30 AM
> To: wdmaudiodev@xxxxxxxxxxxxx
> Subject: [wdmaudiodev] Re: 
> IPortWaveRTStream::AllocateContiguousPagesForMdl problem in Windows 7
>
> Yes, but it is repeatedly failing calls requesting less than one page of
> memory. How can fragmentation cause that?
>
> This problem does not occur on Vista or Server 2008, just on Windows 7.
>
> Jeff
>
> ----- Original Message ----- 
> From: "Cheng-mean Liu (SOCCER)" <soccerl@xxxxxxxxxxxxx>
> To: <wdmaudiodev@xxxxxxxxxxxxx>
> Sent: Tuesday, March 17, 2009 5:18 PM
> Subject: [wdmaudiodev] Re: 
> IPortWaveRTStream::AllocateContiguousPagesForMdl
> problem in Windows 7
>
>
>> Hi:
>>
>>  On a successful call, IPortWaveRTStream::AllocateContiguousPagesForMdl
>> allocates a list of contiguous, nonpaged, physical memory pages and
>> returns a pointer to a memory descriptor list (MDL) that describes them.
>>
>> However, depending on the system state when this is made, the system's
>> pool of nonpaged memory might be fragmented, which could increase the
>> chances for this call to fail because a large block of contiguous 
>> physical
>> memory will become less likely to be available. So, it's not unusual to
>> see failure from this call.
>>
>> By the way, there is hard limit in the portcls that it would return NULL
>> if TotalBytes parameter is greater than 90112
>>
>> Hope this helps.
>>
>> Thanks
>>
>> Cheng-mean Liu
>> Microsoft
>>
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> -----Original Message-----
>> From: wdmaudiodev-bounce@xxxxxxxxxxxxx
>> [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages
>> Sent: Monday, March 16, 2009 6:46 PM
>> To: wdmaudiodev@xxxxxxxxxxxxx
>> Subject: [wdmaudiodev] Re:
>> IPortWaveRTStream::AllocateContiguousPagesForMdl problem in Windows 7
>>
>> Thanks Dogbert. It's good to know it wasn't a case of me doing something
>> fundamentally stupid. I've checked AllocateContiguousPagesForMdl() on the
>> RC
>> version of Vista SP2 and it works fine in that, so hopefully it's just a
>> glitch in the Windows 7 beta that will be corrected in the next update.
>>
>> Jeff
>>
>> ----- Original Message ----- 
>> From: "Dogbert" <dogber1@xxxxxxxxx>
>> To: <wdmaudiodev@xxxxxxxxxxxxx>
>> Sent: Monday, March 16, 2009 4:09 AM
>> Subject: [wdmaudiodev] Re:
>> IPortWaveRTStream::AllocateContiguousPagesForMdl
>> problem in Windows 7
>>
>>
>>> Hi,
>>>
>>> I'm having similar issues on Windows 7 (build 7048, x86):
>>> AllocateContiguousPagesForMdl() returns NULL for most of the time to the
>>> effect that STATUS_INSUFFICIENT_RESOURCES has to be returned for
>>> IMiniportWaveRTStream::AllocateAudioBuffer(). This renders my audio
>>> driver unusable in Windows 7.
>>> The peculiar thing is that AllocateContiguousPagesForMdl() fails no
>>> matter if the size parameter passed to the function is larger or lower
>>> than the page size.
>>> As a workaround, I tried to fiddle around with AllocatePagesForMdl()
>>> which works fine for every size. Since my hardware is from the stone age
>>> and doesn't support scatter-gather tables, I lowered the size parameter
>>> to the size of a single page so as to avoid fragmentation. This value
>>> seems to be rejected by the audio engine because
>>> IMiniportWaveRTStream::FreeAudioBuffer() is called almost directly after
>>> this size is returned by IMiniportWaveRTStream::AllocateAudioBuffer().
>>>
>>> Is there something that I am missing here or is this indeed a bug which
>>> I happened to stumble upon?
>>>
>>> dogbert
>>>
>>> ******************
>>>
>>> WDMAUDIODEV addresses:
>>> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
>>> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
>>> Unsubscribe:
>>> mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
>>> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>>>
>>> URL to WDMAUDIODEV page:
>>> http://www.wdmaudiodev.com/
>>>
>>>
>>
>> ******************
>>
>> WDMAUDIODEV addresses:
>> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
>> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
>> Unsubscribe: 
>> mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
>> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>>
>> URL to WDMAUDIODEV page:
>> http://www.wdmaudiodev.com/
>>
>>
>> ******************
>>
>> WDMAUDIODEV addresses:
>> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
>> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
>> Unsubscribe: 
>> mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
>> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>>
>> URL to WDMAUDIODEV page:
>> http://www.wdmaudiodev.com/
>>
>
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
>
>
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.com/
> 

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/


******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: