Fast & continuous DeviceIoControl makes CPU usage very high

Hi ppl:

  1. My app creates a monitor thread which fetches some data (in
    METHOD_OUT_DIRECT) from my driver without pause. I notice the CPU usage
    keeps very high (about 98%). Any ideas to solve it? I hope this value can be
    as low as possible.

  2. Is it possible to share a file-mapping memory between an app and a
    driver? I have no time to test this idea this week and will be very grateful
    for the answers.

Thanks for any replies. :slight_smile:

Regards,
Ray Yang
xxxxx@ybwork.com

Ignore the first one - I’ve got the answer: In the monitor thread, use
PostMessage instead of SendMessage to notify the main UI to update.

Then, any ideas about the 2nd one?

Regards,
Ray Yang
xxxxx@ybwork.com
----- Original Message -----
From: “Ray Yang”
To: “Windows System Software Devs Interest List”
Sent: Saturday, July 03, 2004 11:26 PM
Subject: [ntdev] Fast & continuous DeviceIoControl makes CPU usage very high

> Hi ppl:
>
> 1. My app creates a monitor thread which fetches some data (in
> METHOD_OUT_DIRECT) from my driver without pause. I notice the CPU usage
> keeps very high (about 98%). Any ideas to solve it? I hope this value can
be
> as low as possible.
>
> 2. Is it possible to share a file-mapping memory between an app and a
> driver? I have no time to test this idea this week and will be very
grateful
> for the answers.
>
> Thanks for any replies. :slight_smile:
>
> Regards,
> Ray Yang
> xxxxx@ybwork.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@ybwork.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Ray Yang wrote:

  1. Is it possible to share a file-mapping memory between an app and a
    driver? I have no time to test this idea this week and will be very grateful
    for the answers.

Yes.

Peter
OSR

Thanks! Then, I can do it now :slight_smile:

Regards,
Ray Yang
xxxxx@ybwork.com
----- Original Message -----
From: “PeterGV”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Wednesday, July 07, 2004 7:14 AM
Subject: Re:[ntdev] Fast & continuous DeviceIoControl makes CPU usage very
high

> Ray Yang wrote:
> >
> > 2. Is it possible to share a file-mapping memory between an app and a
> > driver? I have no time to test this idea this week and will be very
grateful
> > for the answers.
>
> Yes.
>
> Peter
> OSR
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@ybwork.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>