Overclock.net banner

1 - 20 of 117 Posts

·
Registered
Joined
·
2,447 Posts
Discussion Starter #1
Right when USB3 first came out I always hated it because it felt less responsive than USB2. It had a deadzone that did not exist on the previous generation. I always thought it was the fault of the change to the architecture itself - adding more latency when they increased the bandwidth - turns out that wasn't it. Windows USB2 drivers use line based interrupt mode. Windows USB3 drivers use MSI mode by default.

For some reason over the span of years I never tested this before, but after manually forcing this Haswell boxes' USB3 controller to line based interrupt mode instead of it's MSI mode default, the deadzone is gone and responsiveness seems to be comparable to USB2 again.
 

·
Registered
Joined
·
533 Posts
r0ach you should try comparing ISR/DPC between both using xperf, and see if you can find a major difference during use/gameplay.

See this for a simple how-to:
https://forums.guru3d.com/threads/simple-way-to-trace-dpcs-and-isrs.423884/

I have a script (xperfdpcisr.ps1) to help automate part of the process as well on my github which you could customize for your tests if you know a little scripting e.g. Sleep for 5, open game, record for 30 etc.
https://github.com/djdallmann/GamingPCSetup/tree/master/Scripts

I use usb3.0 with MSI (default) but I've adjusted the usb controller interrupt affinity to land on a less used core (not core0), and modified the MSI Msg Limit to 3 vs 8 (default?). This provides the best dpc/isr results on my pc.
 

·
Registered
Joined
·
2,447 Posts
Discussion Starter #6
r0ach you should try comparing ISR/DPC between both using xperf
I am of the belief that performance doesn't just magically spring out of thin air all of a sudden and the fact MSI mode USB drivers have less overhead is simply due to the fact they're likely putting things in a lower/shared priority bin than how the USB2 line based interrupt drivers did. The fact the deadzone and lower responsiveness of USB3 disappears when forcing line based interrupt mode instead of MSI seems to comfirm that fact to me.

I doubt tinkering with variables like "message limit" like you suggested will have any effect. I think you would need to alter something called "delivery mode" to change priority of MSI interrupts. I'm not sure if that's an OS attribute or if you would need to haxor the Windows default USB3 driver itself to change that. As of right now, I'm pretty happy with the massive increase in responsiveness for this Haswell box by simply forcing the USB3 driver to line based interrupt mode.

For anyone that doesn't know, Haswell (Z87) has both a USB2 and USB3 controller running at the same time, but if you plug a device into the USB2 ports on Win 8.1 or Win 10, the USB2 ports act in passthrough mode and they'll be controlled by the USB3 controller instead. This phenomenon doesn't happen on Z77 or Z97 (because Z97 has no USB2 controller at all), so I'm not sure if the results will be exactly identical or not on Z97 and higher but I suspect they will. Regardless, it's a godsend for Haswell boxes and should probably be the same for later chipsets.
 

·
Registered
Joined
·
2,447 Posts
Discussion Starter #7 (Edited)
my usb3 gets the same irq with my gpu when i do this, should i set gpu to msi mode or leave them both on it?
The extent to which shared IRQs do or don't cause problems in modern OS's is something not many people have legit answers to or agree upon. I run very barebones systems and from memory, I seem to recall USUALLY having shared IRQs unless the ethernet, GPU, and USB controller were all in MSI mode. I'm guessing if you took the USB controller out of MSI mode, you would need to have the GPU and ethernet in MSI mode to not share IRQs. But does it really matter? I don't know.

All I know is the only way I could find to get rid of the deadzone from USB3 Windows drivers is to force the driver to line based interrupt mode instead, so whatever happens concerning shared IRQs is a secondary concern. The aim feels very good on this current Haswell system after forcing the USB driver to line based interrupts and it does have shared IRQs, so I'm not sure if shared IRQs are actually much of a problem or not.

*edit: Another thing is, some people don't know this but it's EXTREMELY important to make sure your mouse is plugged into USB port 0 on the motherboard (or 1 if there's no port 0 and it's labeled 1 instead). Mouse movement is a lot more different if your keyboard is plugged into the first port and mouse in the second - typically more floaty. USB port 0 is typically located closest to the motherboard itself with higher number ports being stacked on top of it but might not always be the case for some boards.
 

·
Registered
Joined
·
533 Posts
I am of the belief that performance doesn't just magically spring out of thin air all of a sudden and the fact MSI mode USB drivers have less overhead is simply due to the fact they're likely putting things in a lower/shared priority bin than how the USB2 line based interrupt drivers did. The fact the deadzone and lower responsiveness of USB3 disappears when forcing line based interrupt mode instead of MSI seems to comfirm that fact to me.
Sure, just trying to provide opportunity to help identify the differences.

For anyone that doesn't know, Haswell (Z87) has both a USB2 and USB3 controller running at the same time, but if you plug a device into the USB2 ports on Win 8.1 or Win 10, the USB2 ports act in passthrough mode and they'll be controlled by the USB3 controller instead.
Out of curiosity how do you know it's acting in pass through mode to a completely separate usb controller? thanks
 

·
Registered
Joined
·
533 Posts
Another thing is, some people don't know this but it's EXTREMELY important to make sure your mouse is plugged into USB port 0 on the motherboard (or 1 if there's no port 0 and it's labeled 1 instead). Mouse movement is a lot more different if your keyboard is plugged into the first port and mouse in the second - typically more floaty. USB port 0 is typically located closest to the motherboard itself with higher number ports being stacked on top of it but might not always be the case for some boards.
Would be cool to quantify these, never measured it myself. interrupt and dpc latency differences between ports.
 

·
Registered
Joined
·
2,447 Posts
Discussion Starter #10 (Edited)
Out of curiosity how do you know it's acting in pass through mode to a completely separate usb controller? thanks
Open device manager, click view tab and "show hidden devices", then click view tab again and click "devices by connection". It will show you what is connected to which controller in tree hiearchy.

The two ehci USB2 controllers on Z87 have no reason to exist when used with Windows 8.1 or higher. Only in Windows 7 will it actually utilize those controllers at all. But Windows 7 is garbage with modern GPUs that use things like tile rendering (everything Maxwell and higher?) and need a fully 3d hardware accelerated desktop to not be junk. Windows 8.1 is the current master race gaming platform.
 

·
Vermin Supreme 2020
Joined
·
25,774 Posts
Would be cool to quantify these, never measured it myself. interrupt and dpc latency differences between ports.
you've crossed a line here good sir. this is the difference between what you and r0ach do.

we don't do quantification round these parts. get outta here with that Colonialthink.
 
  • Rep+
Reactions: aayman_farzand

·
Registered
Joined
·
2,447 Posts
Discussion Starter #13
Would be cool to quantify these, never measured it myself. interrupt and dpc latency differences between ports.
The difference in having your mouse vs keyboard plugged into port 0 is a real noob trap. On this Haswell board in front of me, having the keyboard plugged into the first port and mouse in the second makes cursor movement seem a little more frictionless and faster, but it's also more floaty at the same time. An untrained nooblord like Skupples could mistake this as being a positive thing.

The difference in mouse movement between the two is probably the keyboard getting more priority than the mouse being in an earlier port and the mouse getting polls dropped or something so the cursor is more conducive to skip across the screen with less accuracy. And of course if you were using a USB3 controller with MSI mode instead of line based interrupts, neither port would feel correct and you'd have no idea w.t.f is going on or which one to use.
 

·
Registered
Joined
·
1,221 Posts
Open device manager, click view tab and "show hidden devices", then click view tab again and click "devices by connection". It will show you what is connected to which controller in tree hiearchy.

The two ehci USB2 controllers on Z87 have no reason to exist when used with Windows 8.1 or higher. Only in Windows 7 will it actually utilize those controllers at all. But Windows 7 is garbage with modern GPUs that use things like tile rendering (everything Maxwell and higher?) and need a fully 3d hardware accelerated desktop to not be junk. Windows 8.1 is the current master race gaming platform.
nice r0ach I'll check it with gigabyte x399 auros gaming 7.
 

·
Registered
Joined
·
100 Posts
Makes sense actually. Since my via usb controller card feels better than motherboards native USB ports. Will try to force on-board usb's to line based when I get "on-shore" again
 

·
Mouse lover
Joined
·
2,854 Posts
Been gaming on my intel USB 3.0 port for 5-6 years now zero issues, no difference between my usb 2.0 port on the rear I/O

Do you have any testing/proof/source?
 

·
Mouse addict
Joined
·
737 Posts

·
Registered
Joined
·
116 Posts
The rules need to be amended. This forum has literally become astrology but with mice instead of star signs
 
1 - 20 of 117 Posts
Top