Networking Forums

Networking Forums > Computer Networking > Windows Networking > Driver calls vs graphics mutex vs Ethernet card

Reply
Thread Tools Display Modes

Driver calls vs graphics mutex vs Ethernet card

 
 
Ozo
Guest
Posts: n/a

 
      12-11-2003, 11:56 PM
I am currently debugging a multithreaded application where one thread (the
"Render" thread) is using the display driver (i.e. through ExtEscape calls).
The system is a dual CPU Windows 2000 system (SP2), with two displays (i.e.
two display drivers); the application is using the secondary display only.
The Render thread is running at real-time priority (i.e. priority 29).

I have a strange problem where once in a while, an ExtEscape call to the
display driver (e.g. some custom escape function)
takes _way_ too much time (ex: 12msec). After thorough debugging, I know
that my application thread is preempted just when it calls ExtEscape, as if
Windows was serializing accesses to the display driver (some global graphics
mutex?). It is not a matter of "quantum completion" because my thread is at
priority 29 and I also know that the Window's scheduler usually schedule the
Idle thread during these 12msec.

What is also very strange, is that when this 12msec "glitch" occurs with the
Render thread, my other thread (which is running
simultaneously on the other CPU), suffers from the same glitch too. After
debugging, I know that no thread switch occurs on this CPU, which means that
this thread is simply stopped for 12msec (maybe by an interrupt from some
device?)

To summarize, I have no clue what is going on. My first theory is that an
interrupt is stopping my second thread, and the ISR (or DPC) is doing
something that uses some mutex that will (in some cases) make the Render
thread wait before it can talk to its display driver. But I can not see what
it could be. Is there something special regarding how Windows serializes
display driver accesses that I should know? Something special with multiple
displays? Hardware interrupts that would use the display driver?

Note: We noticed that this problem disappears when we disconnect our
Ethernet card from the network. Our Ethernet chipset
(Intel) is transferring data in DMA to the system memory, and our driver
accesses it by polling only: there is no interrupt used by the driver. When
disconnected, there is no more DMA transfer being done (I assume) but we
keep polling the driver without never getting any packet. Of course, we need
to be connected to the network, so disconnecting is not a viable solution
;-)

Any help is welcome,
Thanks,

Ozo


 
Reply With Quote
 
 
 
 
Louis Solomon [SteelBytes]
Guest
Posts: n/a

 
      01-27-2004, 11:00 AM
have you tried streaming the data from the hdd instead of the ethernet ?

--
Louis Solomon
www.steelbytes.com

"Ozo" <(E-Mail Removed)> wrote in message
news:Go8Cb.10267$(E-Mail Removed) ...
>I am currently debugging a multithreaded application where one thread (the
> "Render" thread) is using the display driver (i.e. through ExtEscape
> calls).
> The system is a dual CPU Windows 2000 system (SP2), with two displays
> (i.e.
> two display drivers); the application is using the secondary display only.
> The Render thread is running at real-time priority (i.e. priority 29).
>
> I have a strange problem where once in a while, an ExtEscape call to the
> display driver (e.g. some custom escape function)
> takes _way_ too much time (ex: 12msec). After thorough debugging, I know
> that my application thread is preempted just when it calls ExtEscape, as
> if
> Windows was serializing accesses to the display driver (some global
> graphics
> mutex?). It is not a matter of "quantum completion" because my thread is
> at
> priority 29 and I also know that the Window's scheduler usually schedule
> the
> Idle thread during these 12msec.
>
> What is also very strange, is that when this 12msec "glitch" occurs with
> the
> Render thread, my other thread (which is running
> simultaneously on the other CPU), suffers from the same glitch too. After
> debugging, I know that no thread switch occurs on this CPU, which means
> that
> this thread is simply stopped for 12msec (maybe by an interrupt from some
> device?)
>
> To summarize, I have no clue what is going on. My first theory is that an
> interrupt is stopping my second thread, and the ISR (or DPC) is doing
> something that uses some mutex that will (in some cases) make the Render
> thread wait before it can talk to its display driver. But I can not see
> what
> it could be. Is there something special regarding how Windows serializes
> display driver accesses that I should know? Something special with
> multiple
> displays? Hardware interrupts that would use the display driver?
>
> Note: We noticed that this problem disappears when we disconnect our
> Ethernet card from the network. Our Ethernet chipset
> (Intel) is transferring data in DMA to the system memory, and our driver
> accesses it by polling only: there is no interrupt used by the driver.
> When
> disconnected, there is no more DMA transfer being done (I assume) but we
> keep polling the driver without never getting any packet. Of course, we
> need
> to be connected to the network, so disconnecting is not a viable solution
> ;-)
>
> Any help is welcome,
> Thanks,
>
> Ozo
>
>



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dead graphics card? [ste parker] Home Networking 6 10-20-2006 07:42 PM
PCI Ethernet card driver needed =?Utf-8?B?UGhpbGlw?= Windows Networking 9 02-24-2006 04:15 PM
Alcatel and a ATI graphics card?!?! mo Broadband 5 11-06-2004 11:29 PM
Driver for PCI Ethernet 10/100 Card Jim Broadband Hardware 2 02-27-2004 08:04 PM
need ethernet driver Hillary Windows Networking 1 11-19-2003 09:45 AM



1 2 3 4 5 6 7 8 9 10 11