USB driver Performance

Hi,

I have written a Cypress EZ USB FX based driver for Windows 2000. This
device is used for ISO based data acquisition using USB (at the rate of
roughly 880 Kb/sec).
I have an application which fetches the data from this driver using an IOCTL
(Direct I/O). In normal system load conditions, the driver works perfectly
and the application doesn’t loose any data.

However, if the system load is high, then the OS delays scheduling of the
data acquisition application and the driver fills up its allocated memory
pool. This results in frame loss.
This driver memory pool is fixed and increasing the memory pool in the
driver only delays this frame loss problem

Is there some way I can prevent frame loss -

  1. May be increasing application priority from within the driver.
  2. May be calling user mode function, from within in the driver, which sends
    the IOCTL to this driver.
  3. Any other better way ?

Pointers in this regard would be highly appreciated.

TIA

Rahul.

    • spool to paged pool buffers with much higher limits and feed the app
      from the spool.

Ultimately on a multipurpose non-realtime system like NT there is no way to
guarantee data acquisition without frame loss, for some threshold value of
input bandwidth. Either restrict system use or provide a much looser
guarantee than ‘no frame loss’.

=====================
Mark Roddy

-----Original Message-----
From: rahul gupta [mailto:xxxxx@dcmtech.co.in]
Sent: Tuesday, April 13, 2004 10:52 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB driver Performance

Hi,

I have written a Cypress EZ USB FX based driver for Windows
2000. This device is used for ISO based data acquisition
using USB (at the rate of roughly 880 Kb/sec).
I have an application which fetches the data from this driver
using an IOCTL (Direct I/O). In normal system load
conditions, the driver works perfectly and the application
doesn’t loose any data.

However, if the system load is high, then the OS delays
scheduling of the data acquisition application and the driver
fills up its allocated memory pool. This results in frame loss.
This driver memory pool is fixed and increasing the memory
pool in the driver only delays this frame loss problem

Is there some way I can prevent frame loss - 1. May be
increasing application priority from within the driver.
2. May be calling user mode function, from within in the
driver, which sends the IOCTL to this driver.
3. Any other better way ?

Pointers in this regard would be highly appreciated.

TIA

Rahul.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
xxxxx@lists.osr.com

When your USB Driver completes the calls IoCompleteRequest on the IRP, is it
specifying a priority boost. While that may not solve all your problems,
it should give your application more opportunity to run and complete queued
I/O. Another solution may be for your application to have a dedicated
high priority thread whose only responsibility is to retrieve data from your
driver.


Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com/
“rahul gupta” wrote in message
news:xxxxx@ntdev…
> Hi,
>
> I have written a Cypress EZ USB FX based driver for Windows 2000. This
> device is used for ISO based data acquisition using USB (at the rate of
> roughly 880 Kb/sec).
> I have an application which fetches the data from this driver using an
IOCTL
> (Direct I/O). In normal system load conditions, the driver works perfectly
> and the application doesn’t loose any data.
>
> However, if the system load is high, then the OS delays scheduling of the
> data acquisition application and the driver fills up its allocated memory
> pool. This results in frame loss.
> This driver memory pool is fixed and increasing the memory pool in the
> driver only delays this frame loss problem
>
> Is there some way I can prevent frame loss -
> 1. May be increasing application priority from within the driver.
> 2. May be calling user mode function, from within in the driver, which
sends
> the IOCTL to this driver.
> 3. Any other better way ?
>
> Pointers in this regard would be highly appreciated.
>
> TIA
>
> Rahul.
>
>
>

Use asynchronous IO with multiple IOCTLs.

Burk.

Dipl.-Ing. Burkhard Daniel Professional System Software Engineering
xxxxx@system-software.net http://system-software.net
fon/fax: +49-30-55153591 mobile: +49-179-5319489

rahul gupta wrote:

Hi,

I have written a Cypress EZ USB FX based driver for Windows 2000. This
device is used for ISO based data acquisition using USB (at the rate of
roughly 880 Kb/sec).
I have an application which fetches the data from this driver using an IOCTL
(Direct I/O). In normal system load conditions, the driver works perfectly
and the application doesn't loose any data.

However, if the system load is high, then the OS delays scheduling of the
data acquisition application and the driver fills up its allocated memory
pool. This results in frame loss.
This driver memory pool is fixed and increasing the memory pool in the
driver only delays this frame loss problem

Is there some way I can prevent frame loss -

  1. May be increasing application priority from within the driver.
  2. May be calling user mode function, from within in the driver, which sends
    the IOCTL to this driver.
  3. Any other better way ?

Pointers in this regard would be highly appreciated.

TIA

Rahul.


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@system-software.net
To unsubscribe send a blank email to xxxxx@lists.osr.com