RE: Re: [ntdev] Re: [ntdev] IRQL Priority Problems

Windows has poor timer resolution by default. It’s set up so timers tick 64 times per second or every 15.5 ms. We need to get the buffer refilled at least once ever 11.5 ms. So to make this work, we change the global system timer resolution from 15.5 to 1 ms. This affects the OS on a global scope and is not all that recommended, but not unheard of. And it allows us to tick our WDF_TIMER at 1 ms. So we top up the buffer constantly, refilling the buffer 11 times in that 11.5 ms window… it would take pretty bad system latency to not keep up. The gaps we were seeing in transition due to DPC latency were typically 100-200 us.

Letting the buffer go almost empty, using the only interrupt supported by the chip and hoping windows services us within 200 us (even the ISR could get preempted, I’ve seen the USB driver do it to us) was just cutting it too close. Now we’re trying to run with a full buffer at all times, leaving lots and lots of room for windows being windows, even if we lost 9/10 timer ticks, we’re still not empty.

Cheers,
Brad


From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Marion Bond [xxxxx@hotmail.com]
Sent: Thursday, April 16, 2015 8:46 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: [ntdev] Re: [ntdev] IRQL Priority Problems

Well the how isn’t that hard

He had changed the system timer resolution to 1ms and set a timer to run every 2/5 ms and in the call back he stuffs as many words as will fit into his hardware

On account of the slow hardware he is working with, he manages with this design

Sent from Surface Pro

From: xxxxx@osr.commailto:xxxxx
Sent: ?Thursday?, ?April? ?16?, ?2015 ?10?:?49? ?AM
To: Windows System Software Devs Interest Listmailto:xxxxx

I am very happy this worked for you. I am also seriously struggling to understand how it could! This either points to a lack of knowledge on my part in terms of your original problem or Windows internals.

But, again, I’m very happy it’s worked out!,

Peter
OSR
@OSRDrivers


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

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</mailto:xxxxx></mailto:xxxxx>