Page 1 of 123
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
… or another attempt to improve latencies
Little bit of theory:
*****
From «Windows Internals» by Mark Russinovich, David A. Solomon, Alex Ionescu
Line-Based vs. Message Signaled-Based Interrupts
Shared interrupts are often the cause of high interrupt latency and can also cause stability issues. They are typically undesirable and a side effect of the limited number of physical interrupt lines on a computer. For example, in the previous example of the 7-in-1 media card reader, a much better solution is for each device to have its own interrupt and for one driver to manage the different interrupts knowing which device they came from. However, consuming four IRQ lines for a single device quickly leads to IRQ line exhaustion. Additionally, PCI devices are each connected to only one IRQ line anyway, so the media card reader cannot use more than one IRQ in the first place.Other problems with generating interrupts through an IRQ line is that incorrect management of the IRQ signal can lead to interrupt storms or other kinds of deadlocks on the machine, because the signal is driven “high” or “low” until the ISR acknowledges it. (Furthermore, the interrupt controller must typically receive an EOI signal as well.) If either of these does not happen due to a bug, the system can end up in an interrupt state forever, further interrupts could be masked away, or both. Finally, line-based interrupts provide poor scalability in multiprocessor environments. In many cases, the hardware has the final decision as to which processor will be interrupted out of the possible set that the Plug and Play manager selected for this interrupt, and there is little device drivers can do.
A solution to all these problems is a new interrupt mechanism first introduced in the PCI 2.2 standard called message-signaled interrupts (MSI). Although it remains an optional component of the standard that is seldom found in client machines, an increasing number of servers and workstations implement MSI support, which is fully supported by the all recent versions of Windows. In the MSI model, a device delivers a message to its driver by writing to a specific memory address. This action causes an interrupt, and Windows then calls the ISR with the message content (value) and the address where the message was delivered. A device can also deliver multiple messages (up to 32) to the memory address, delivering different payloads based on the event.
Because communication is based across a memory value, and because the content is delivered with the interrupt, the need for IRQ lines is removed (making the total system limit of MSIs equal to the number of interrupt vectors, not IRQ lines), as is the need for a driver ISR to query the device for data related to the interrupt, decreasing latency. Due to the large number of device interrupts available through this model, this effectively nullifies any benefit of sharing interrupts, decreasing latency further by directly delivering the interrupt data to the concerned ISR.
Finally, MSI-X, an extension to the MSI model, which is introduced in PCI 3.0, adds support for 32-bit messages (instead of 16-bit), a maximum of 2048 different messages (instead of just 32), and more importantly, the ability to use a different address (which can be dynamically determined) for each of the MSI payloads. Using a different address allows the MSI payload to be written to a different physical address range that belongs to a different processor, or a different set of target processors, effectively enabling nonuniform memory access (NUMA)-aware interrupt delivery by sending the interrupt to the processor that initiated the related device request. This improves latency and scalability by monitoring both load and closest NUMA node during interrupt completion.
*****Now practice.
Checking for PCI devices working in MSI-mode.
Go to Device Manager. Click in menu «View -> Resources by type». Expand «Interrupt request (IRQ)» node of the tree. Scroll down to «(PCI) 0x… (…) device name» device nodes. Devices with positive number for IRQ (like «(PCI) 0x00000011 (17) …») are in Line-based interrupts-mode. Devices with negative number for IRQ (like «(PCI) 0xFFFFFFFA (-6) …») are in Message Signaled-based Interrupts-mode.Trying to switch device to MSI-mode manually.
You must locate device`s registry key. Invoke device properties dialog. Switch to «Details» tab. Select «Device Instance Path» in «Property» combo-box. Write down «Value» (for example «PCI\VEN_1002&DEV_4397&SUBSYS_1609103C&REV_00\3&11583659&0&B0»). This is relative registry path under the key «HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\».Go to that device`s registry key («HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI\VEN_1002&DEV_4397&SUBSYS_1609103C&REV_00\3&11583659&0&B0») and locate down the subkey «Device Parameters\Interrupt Management». For devices working in MSI-mode there will be subkey «Device Parameters\Interrupt Management\MessageSignaledInterruptProperties» and in that subkey there will be DWORD value «MSISupported» equals to «0x00000001». To switch device from legacy- to MSI-mode just add these subkey and value.
Before adding these key and value (or changing «MSISupported» to «0x00000001» in case subkey and value already exist) you have to perform safety steps like doing backup (creating system restore point at least).
Do tweak one device -> reboot and check (1) if it is displayed in Device Manager as correctly working device; (2) if its IRQ became negative -> if no (1) and no (2) then either remove subkey «MessageSignaledInterruptProperties» (if you added it) or change «MSISupported» to «0x00000000» and reboot.
Theoretically if device driver (and platform = chipset) unable to perform in MSI-mode it should ignore mentioned subkey and value. But who knows…
Trying to switch device to MSI-mode with MSI utility v3 (run as administrator)
http://www.mediafire.com/file/ewpy1p0rr132thk/MSI_util_v3.zip/file
MD5 hash for zip-file: C08D7AE2FFF3052FD801F6BF33831D08Change log:
— showing multiple IRQs for device (previous version showed only first of multiple IRQs);
— extending the details pane (under the grid) for the selected device to show more properties — PNP and PCI ones;
— replacing WMI with Setup API for retrieving device properties — so all info should be available on Win7/Win8 rigs;
— replacing registry names of devices with normal PNP display names from Setup API;
— adding the ability to launch the registry editor with selected device instance by double click on the device;
— showing the MSI mode settings specified in device driver inf-file.Edit: If you have old rig and there are no devices working in MSI-mode, then may be you should not experiment with this tweak.
As this tweak is risky then you probably should not tweak devices which can prevent Windows to boot (by their failure) — SATA controllers, videocards. Especially if they do not share their IRQ with another devices.Edit: Before changing anything in MSI utility take a screenshot just in case!
Edit: Troubleshooting topic:
Create a Windows installation USB drive, then create a restore point so in case of failure you can boot from installation drive and choose recovery and restore from created restore point.
Edit: Improper Propagation of SATA Message Signaled Interrupts on AMD SB950Description
The SATA Message Signaled Interrupt (MSI) from higher port numbers may not properly propagate to port 0 before being sent to the driver.Potential Effect on System
On a platform with SATA MSI enabled and activity occurring on SATA devices connected to three or more ports, if the failing condition occurs, the driver will not receive the interrupt and the system will hang.Suggested Workaround
Do not expose the MSI capability in the SATA controller. This change is implemented in CIMx version 1.1.0.2.Fix Planned
NoEdit: Here is Intel`s paper (thanks to n1hilist):
http://www.intel.co.za/content/dam/…hite-papers/msg-signaled-interrupts-paper.pdfEdit: Easy way to measure ISRs and DPCs
https://forums.guru3d.com/threads/simple-way-to-trace-dpcs-and-isrs.423884/Edit: Dedicated thread about interrupts in Windows
https://forums.guru3d.com/threads/a-bit-detailed-info-about-interrupts-in-windows.424677/Edit: External Interrupts in the x86 system. Part 1. Interrupt controller evolution
https://habr.com/en/post/446312/Edit: Use this site to check hash value for files in this post — https://hash.online-convert.com/md5-generator
Even if it gives wrong hashes using the same site proves the un-compromised state.Last edited: Mar 21, 2025
-
So this has no effect on the IRQ’s for the Numeric Data Processor and System CMOS/Real time clock? Both of these use IRQ’s.
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Are these the PCI devices in your rig? At mine they are ISA ones.
-
Great write up, although i found it somewhat difficult to follow and re-read it many times as i was confused to what the main «wanted» goal was and what was to be created.
This worked for my video card but not asus xonar essence stx audio device. I have the latest xonar software with no addons. I have always believed some of my problems (latency, DPC, etc.) has been related to his.. or maybe im just that stupid to think so i dont know. However, i’d thought i’d try. I had initially messed up by not creating the «MessageSignaledInterruptProperties» subkey first before adding «MSIsupported». I went back and re-read the post and seen the mistake which then after a reboot showed that this worked for my video card.
IS there something that prevents the change to MSIsupported mode or a software conflict/reason this wont work as like the USB 2 controllers you tried?
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
It`s my clumsy english. Sorry.
As for MSI-mode, device itself has to use (implement) MSI capability, and its driver too.
And what about network card and SATA controller in your rig? I suspect that video card is not the source of mass interrupt bursts…
Last edited: May 14, 2013
-
Network adapter is Intel 82579V. It is already at a -2 IRQ. On a side note if audio wasn’t the problem then either this is or maybe usb. I notice that if i mess with the performance settings or interruption/filter settings my net has extreme amount of drops. Youtube videos stop loading, my games freeze periodically as if i lose my connection and regain it. I have read so much into it and have not found the cause still after 6 months. My net is good, my modem is fine as well (just got firmware update i think yesterday even).
TBH i havent even looked at my SATA controller. Its in Line-based mode.
I will look at it tonight when i get time to mess with things again. -
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Have you tried:
— tweaking NetworkThrottlingIndex;
— tweaking TCP/IP (there is recommendation to enable TCP RSS when NIC is working in MSI-mode);
— disabling CPU core parking;
— this thread
??? -
I have slowly got into Von’s page on performance tweaks. Many i’ve done before and or found else where so i found myself either repeating or skipping.
I monkeyed with tonight with the IRQ and upon reboot i got a blue screened before windows could log in. I ended up just reinstalling windows because i did not have system restore on that partition as i do with this one; why i dont remember.
And with a new fresh install i can hopefully nail what is causing my problems by introducing 1 thing at a time.
I did core parking and the network throttling i put to 0.
This maybe unheard off but by god i believe its keyboard or mouse related but there is no way to really test.No way mean i dont have replacements or software that i know of to find problems. I have g100 keyboard and g500 mouse.
It seems that my disconnects only happen during me actually using my hardware. Example me spectating in call of duty or bf3 or tf2i have yet to see this same phenomenon happen. My disconnects and by this i mean my game freezes and connection drops and returns are made worse by excessive input from me. So putting the peices together makes me rule out internet issues however it acts just like an internet issue. Hell it reminds of the House episode where they believe its cancer but every test shows that is not cancer. Strange.I have no idea gentlemen. I am ready to slap this on ebay, all of it, and say the hell with it. I’ll build from the ground up when i have time.
In vons thread he goes into device manager to disable stuff, so i did to. Looking under device manager i see x4 HID complaint keyboard and same for mouse. I see «virtual keyboard» and «virtual mouse». Which makes me wonder, but that about it.
I dont know. I would seriously pay someone to sit at my computer and do all that is necessary to find out why i can’t use it.
Last edited by a moderator: May 15, 2013
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Definitely you need network troubleshooting guru. May be from your internet provider.
-
Yea but im not sure if they would find anything. I’m at the point now i dont care anymore-i’ve given up.
To make my day even better my keyboard decided not to work today in its current usb slot, so i had to change usb slots t type this messsage. Why?…
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Generic recommendation for not working USB ports is to shutdown PC, remove power cable for 5-10 minutes. Or try powered USB hub.
As for network, imo troubles are 20% of internal hardware-software and 80% of external network protocol ones. Especially when xDSL modem involved.
Btw, you can try discrete NIC, if you suspect your (most probably integrated) one is culprit. -
I believe that i might have fixed the issue, fingers are crossed. If it isn’t then i truly will just take a 12 gauge and light this whole thing up.
Two issues: 1) turned modem into a bridge via NAPT mode disabled; known issue with my modem (surfboard from motorola).
2) Keep getting usb3 power surge message. Switched 1 input to FP usb and the other to the back. So far working.The strangest thing happened to me as well. I went through the bios to see if maybe it was power related, turned everything to stock voltages as i had been using part of an OC profile but had de-clocked my cpu long ago just never returned the voltages. Log into windows to find that my mouse is super laggy, my cpu usage is 80 percent, my ram is almost maxed at 8gigs. Logitech gaming software was using over 2 gigs of ram… all hell broke loose. I went back and re did an overlock on my system said why the hell not after i couldn’t fix the damn thing lets fry it.
Well it works now.Uhm sorry i have derailed this thread. I believe i noticed some* maybe some improvement with these tweaks. I will re-do them on my fresh install of windows.But the SATA controller is off limits.
Thanks -
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Yeah, that was USB troubleshoot # 1 — use back panel ports instead front panel ones.
-
http://i.imgur.com/khBUUqp.png
Am I doing this correctly? Because if I am, I can’t even get this to work on my Audigy. Ah well, no harm done. -
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Yeah, seems correctly. Audio-card is not the source interrupts bursts, I assume. SATA controllers, USB-controllers, NICs are…
-
pipes
Member Guru- Messages:
- 188
- Likes Received:
- 1
- GPU:
Hi man, I have do all you say in this guide, only 3:
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 1 — 3408
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 7 — 340E — 340e
Intel(R) 7500/5520/5500/X58 I/O Hub PCI Express Root Port 3 — 340A — 340aI can’t make in msi-mode, Why You know?
-
Probably because of this,
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Only those 3 were switched into MSI-mode?
You see, for MSI-mode must participate: chipset, device and device drivers. -
pipes
Member Guru- Messages:
- 188
- Likes Received:
- 1
- GPU:
-
pipes
Member Guru- Messages:
- 188
- Likes Received:
- 1
- GPU:
is not in msi-mode and I cant change into msi-mode :bang:
Page 1 of 123
Share This Page
Page 2 of 123
-
Lol, you have it the other way around. Read the guide, negative numbers mean it’s running in MSI mode. mbk is ironically right when he misunderstood you, those are the only devices in your screen-cap that are in MSI mode.
-
Also, just tried applying MSI mode to my USB and SATA controllers. I blue screened. Had to learn how to reg load the registry from the recovery console and fix it from there (which was interesting).
mbk, what did you do when you were doing trial-and-error? Did you really use windows recovery each time? Got to be a better way… because I’m pretty sure I can apply MSI mode to some of the controllers. -
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
I`ve looked at the picture and can say, that at least your video-cards and SATA controller do not share IRQ with another devices. But your Marvell Yukon NIC does share IRQ (18) with USB controllers 3A44 and 3A3C. In case these particular USB controllers have some USB devices attached to them you better connect USB devices to another ports to try to avoid those USB controllers usage. If no devices connected to them USB controllers you can disable them in Device Manager to provide Marvell NIC with exclusive IRQ.
And line-mode of devices is no reason to bang the wall. It is normal mode but merely less optimal then message-mode.
Last edited: May 24, 2013
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Well, beeing a programmer in the company whose main product line is software for hard disk management, backup and restore, I just use bootable DVD with WinPE and our software to backup internal HDD to the external HDD. Imo this is the best protection against any possible damage.
But I was sure that if you fail to boot you always have boot option «last known good configuration»….
And once again — better try one device per attempt (attempt per device?).
Last edited: May 24, 2013
-
Isn’t WinPE a lot like the recovery console?
Problem is, I think the CurrentControlSet key is volatile, because when I used my method it did not exist. I had to change (aka, delete) the MessageSignaledInterruptProperties keys from the ControlSet001, ControlSet002, and ControlSet003 keys instead.Doesn’t «Last Known Good Configuration» just take you back to your most recent windows recovery backup that booted? I mean sure that would work, but even that is more annoying than using the recovery console.
Yeah, when I build up the nerve I’ll give it another go another time.
Last edited: May 24, 2013
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Not a console: http://en.wikipedia.org/wiki/Windows_Preinstallation_Environment . I mean it has GUI and all that.
As for CurrentControlSet — it is namely a link to the one last known good key of ControlSetNNN keys.
Edit:
Without «recovery backup» words. Every time Windows successfully started it creates a copy of ControlSetNNN key. And if you choose that boot option Wondows must discard its newest ControlSetNNN key and take previous one. Imo it is simple and quick.
Last edited: May 24, 2013
-
Yeah WinPE is very similar. Modern day recovery tool is pretty much a preinstallation environment.
http://partition-recovery.com/images/Vista_Repair_2.jpg
I used that last option there, and used regedit from cmd, gui works fine. Problem is, it loads its own registry hives. So I needed to load the system hive, make changes, and then unload it. Very annoying but at least it works, and I’m guessing since CurrentControlSet -I think- is made on startup it did not exist for me. Dose WinPE load the registry directly from your windows installation?Because like I said, the key did not exist for me outside of windows, but the changes I made to the CurrentControlSet key while in windows must have been applied to the entries of the devices in the ControlSet001-3… if that makes sense…
Point is, it’s annoying lol.
Regarding Last Known Good Configuration, I believe you. But for whatever reason I did not get that option. It wanted me to scan the whole windows installation for errors that could prevent startup (and thus ruining all the customization and visual tweaks I have).
Last edited: May 24, 2013
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
No. And I don`t use WinPE to edit registry. In that you are more advanced user.
Out of my pedantry and tediousness — CurrentControlSet is not real key, it is link to one of CurrentControlSetNNN keys.Edit:
Sounds like you are talking about recovery console stage. That «Last known» feature is at the previous stage of «F8» boot menu. I don`t know about Win8 though.
Last edited: May 24, 2013
-
Oh, alright, explains why the key did not show up.
And I’m just lucky I had my girlfriends laptop to google how to load and unload registry hives from the recovery console. (without a disc).edit: maybe that is what I am thinking. I remember Last Known Config showing up after a unsuccessful boot in the past, so I assumed that would not work for me and used F8 and chose «repair your computer» (which does not really scan anything, it’s that recovery console picture I posted).
Alright, at least I have more options when I go at it again. Though, this kinda makes backing up the registry redundant.
Last edited: May 24, 2013
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Do you feel growing accomplishment? You must…
-
Oh I do. Oh… I do. Lol.
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
Probably I should copy here a piece of «Windows internals» about that «Last known good configuration» feature intrinsics. For a troubleshoot info.
Edit: Done… Read at the OP.
Last edited: May 24, 2013
-
Or at least mention it in your guide in the first post, since making a backup of the registry is not very helpful if you can’t boot anyway.
-
pipes
Member Guru- Messages:
- 188
- Likes Received:
- 1
- GPU:
I can’t change irq?
The staticvector is irq? -
pipes
Member Guru- Messages:
- 188
- Likes Received:
- 1
- GPU:
3A44 is not a controller usb is pci port 3: Intel(R) ICH10 Family PCI Express Root Port 3 — 3A44
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
You can change IRQ only by switching device to MSI-mode. I don`t know other ways. In old Windows user could change IRQ in device properties. But now all controls are disabled there. So if you can`t switch device to MSI-mode but have devices sharing the IRQ you can disable not used devices to avoid such sharing.
Last edited: May 24, 2013
-
pipes
Member Guru- Messages:
- 188
- Likes Received:
- 1
- GPU:
Understand!!!
Thank you for your explanation -
So I tried this method. This is the result so far:
The ones not highlighted I didn’t bother to change, should I?
-
Von Dach
Master Guru- Messages:
- 625
- Likes Received:
- 5
- GPU:
-
NV560Ti @900/2394 ATI4890
This is the result for an I7 Z68 after enabling all PCI SubKeys with MSISupported.
Before
After
-
pipes
Member Guru- Messages:
- 188
- Likes Received:
- 1
- GPU:
how u do to change all in not conflict?
Page 2 of 123
Share This Page
Page 4 of 123
-
Then I’ll just put it back. I don’t upgrade drivers that regularly anyways, only if a game has horrible performance (and nvidia fixes it) or if a new tweaking feature is added.
Either way it works, system seems a bit snappier in general, loading pages in browsers, etc. Still need to test it in games.
Have to admit though, when running dpc latency checks or latencymonitor, the nvidia driver was one of the ones reporting the highest latencies, together with the audio and network drivers.
Network drivers seem alot better in Windows 8 compared to 7 though, it’s almost as if alot of tweaks from Von Dach’s thread have been applied by default in Windows 8.
Running wireshark on an idle system, on W7 there’s also alot more going on on the NIC in the background compared to W8.
EDIT: Scrap «a bit snappier», I knew nvidia drivers were getting a bit laggier and bloated lately compared to like 2 or 3 years ago, but damn every visual change on my screen just pops up so smooth now.
Last edited: May 27, 2013
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
By highest latencies of nvidia, audio and network drivers you mean highest DPC routine execution time, right? I think, DPC execution time doesn`t depend on device IRQ mode, because DPC routine does actual work of driver, which is the same all the time — to service video, audio and network requests.
Highest ISR routine execution time can depend on device IRQ mode, being the routine that handles interrupt request…
Last edited: May 27, 2013
-
switch my 660gtx to msi mode cant see we see if make any diffrence
Should pci e roots be changed to msi if gpu is in msi?
Last edited: May 28, 2013
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
At the home rig (Intel chipset) I switched manually pci-e ports along with the other devices. At work rig (AMD chipset) pci-e ports were switched automatically after I switched connected to them devices. At home rig I don`t see any performance diffs, but at work rig the diffs are huge. Try to switch pci-e ports too, but if you have powerful rig you most probably won`t see big improvements.
-
Never checked for those, guess they might’ve been pretty high as well. Overal anything visual related just feels smoother.
-
did you do pci express ports too? im all for smoother visuals right now I just have Nic,Sata,gpu in msi mode. trying to decided if I should put my onboard soundcard and pci e in that mode too.
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
I asked only because LatencyMon v5 doesn`t show latencies of drivers. It shows DPC routine execution times at the «Drivers» tab (along with the ISR amd DPC count). And it shows highest ISR execution time (along with the name of driver with highest ISR routine execution time) at the «Stats» tab.
-
its does show the latency of drivers per say just not the drivers as a whole. it show the individual files within the said drivers. That being said.
I Stop looking at latencymon 5 or hell all of them, as any time i seen anything over 500us i get the urge to start messing around with stuff. And I dont see it as worth it anymore. Unless you getting massive studdering in games or poping/click audio dropping its not worth it to mess with hpet or settings that may mess with latency.
As for the MSI stuff I only changed my gpu in to this mode and i cant say I see a diffrence, but then I only really play mmo (Swtor Ro2)these days and there not the best game to judge performance on last time I play Deus Ex Human Revolution the game ran 60fps smooth as butter.
Though the following comes to mind. IF MSI mode is support and a better way of running things why are things not running in the mode by default if its supported?
Sata and Nic were only thing running in those modes which leads me to believe its the drivers that have to set those modes. Which would mean intel RST Drivers and Realtek nic drivers set those modes by default? Mean while Nvidia drivers and Intel Chipset Drivers do not?
I mean I get everything should have it own IRQ and not share em and for most part few few things share irq and there are no conflicts. between peices that do share
Though I would be curious to see if there is any real world benefits that can be documented
Last edited: May 29, 2013
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
DPC execution time adds to the latencies of processes execution, yes. But DPC execution time doesn`t depend on the interrupt mode of device and its driver, because: device`s interrupt occures -> device`s driver`s ISR routine executes and schedules DPC -> device`s driver`s DPC routine executes and does the needed operation. I wrote to Corrupt^ namely in this context — latencies dictated by current interrupt mode (line- of message-).If I was a driver developer I would give you a smart answer to that question. But as a common developer I can say, that it is one of developement rule: do not touch well working code. I can assume that driver developers has no enough desire/motivation to implement new features or choose new MSI-mode as the default one.
Edit: Also switching to MSI-mode may be one avaliable workaround in case IRQ is shared. I don`t know if it is possible in modern Windows` to change IRQ setting manually as it was in old days. All controls are there — in drivers properties dialog — but they are disabled.
Last edited: May 29, 2013
-
xodius80
Master Guru- Messages:
- 790
- Likes Received:
- 11
- GPU:
hi, ive noticed something, my sata is auto configured to msi BUT i checked in the registry and found out that the DWORD value wasent enabled.
did you manualy enabled yours?
-
no mine was already enabled my guess it was enabled with I install Intel RST, that or it always was cause I only enabled it for my gpu, I gona leave the rest as is
-
Tried to switch my ASUS soundcard, it didn’t work yet, it reverted back to line based immediately.
For AHCI or RAID controllers, it was set to line based but installing the newer Intel RST drivers turned it to MSI.
-
well that comferms my though suspicion that its the drivers that put it in that mode.
-
Looks like my posts evaporated with no prior notice.
Well…
-
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
-
As me and some other guy asked before the server issues:
We would still like to get that application that allows us to set all the different Devices to MSI (preferable 1 by 1 mode so I can test), even if an AV is being a pain in the ass (I’ll just turn off the realtime scanner and then add it to the allowed list first).
-
pipes
Member Guru- Messages:
- 188
- Likes Received:
- 1
- GPU:
same irq
Marvell yukon and pci express 1 and 5 use same irq you can see in photo
[IMG=http://img9.imageshack.us/img9/2655/6zfk.jpg][/IMG]
-
@tsunami !you ask why this isn’t on by default ? ROFL ,
Microsoft that’s why .you just are trying to enable it ! Which is relatively easy .but ms suggest setting MSI to one MSI per physical core .(it’s defaulted to 1 per CPU socket by default . why you think ? Again , because of ms ! Ms doesn’t allow driver to set more then one MSI per socket . but ms suggest to set MSI to one per physical core . so for a company like Intel setting things to one per physical core is relatively easy but not for company like amd or nvidia .and now a day ms is so hell bent on saving power that they push for one interrupt per socket . at the end when proper tweaked ?latencymon is likly to be at the top of the list (ROFL)Don’t ask me why the idea in MSI is to reduce the numbers (this include pave fault . you shouldn’t get lot of page fault if you do something is wrong somewhere . so what about the industry in all this ? Microsoft can enable this and probably does since the performance gain are very nice .they don’t have a lot of hardware so its easy .but for hardware maker it is harder .simplest way is to have a small program asking user what it has and set it . I sure would love to see tester. Bothering setting various MSI to enable and setting the value to 1msi per CPU core .on an fx we re talking 8 core this means 8 MSI . I suspect this might be of help for those with say 2 or more 7990 . I left and a while back so I don’t know .you have to remember this everything in a computer is controlled by interrupt . if I go at your house try to speak to you and you don’t answer because you are too busy I’ll be at the door a long while waiting for your acknowledgement .all the while other try to also communicate with you etc this more an issue these days because people are more social . they also record and stream at the same time so this put huge pressure on interrupt system .even enabled it means only 1 CPU core will be used for interrupt .so what happen if you have 38 other interrupt ? Yep they have to wait in line .but if you have 1 MSI per CPU core . the ODs of all of them all being busy are very low . I suspect this will be fully enabled and set to proper ms recommended value in Xbox 1 . it is after all meant to be a very interactive box -
mbk1969
Ancient Guru- Messages:
- 17,466
- Likes Received:
- 15,065
- GPU:
@drbaltazar
In any case for me MSI-based logic (mechanics) looks like big improvement over the Line-based one.
-
ya and Asus already released new driver.sadly on the Intel front it isn’t enabled by default .but I suspect its at the mono end that the problem lies.maybe upcoming hardware from various maker will have this properly set for desktop.true even tho it isn’t properly set most of the time (ya even this month patch from Asus.going from IRQ to MSI alone fix most issue .but streamer are out of luck.
.
Page 4 of 123
Share This Page
MSI Util v3 — used to switch a device to ‘msi mode’ message signalled interrupt mode, instead of line based interrupt mode.
From «Windows Internals» by Mark Russinovich, David A. Solomon, Alex Ionescu
Line-Based vs. Message Signaled-Based Interrupts
Shared interrupts are often the cause of high interrupt latency and can also cause stability issues. They are typically undesirable and a side effect of the limited number of physical interrupt lines on a computer. For example, in the previous example of the 7-in-1 media card reader, a much better solution is for each device to have its own interrupt and for one driver to manage the different interrupts knowing which device they came from. However, consuming four IRQ lines for a single device quickly leads to IRQ line exhaustion. Additionally, PCI devices are each connected to only one IRQ line anyway, so the media card reader cannot use more than one IRQ in the first place.
Other problems with generating interrupts through an IRQ line is that incorrect management of the IRQ signal can lead to interrupt storms or other kinds of deadlocks on the machine, because the signal is driven “high” or “low” until the ISR acknowledges it. (Furthermore, the interrupt controller must typically receive an EOI signal as well.) If either of these does not happen due to a bug, the system can end up in an interrupt state forever, further interrupts could be masked away, or both. Finally, line-based interrupts provide poor scalability in multiprocessor environments. In many cases, the hardware has the final decision as to which processor will be interrupted out of the possible set that the Plug and Play manager selected for this interrupt, and there is little device drivers can do.
A solution to all these problems is a new interrupt mechanism first introduced in the PCI 2.2 standard called message-signaled interrupts (MSI). Although it remains an optional component of the standard that is seldom found in client machines, an increasing number of servers and workstations implement MSI support, which is fully supported by the all recent versions of Windows. In the MSI model, a device delivers a message to its driver by writing to a specific memory address. This action causes an interrupt, and Windows then calls the ISR with the message content (value) and the address where the message was delivered. A device can also deliver multiple messages (up to 32) to the memory address, delivering different payloads based on the event.
Because communication is based across a memory value, and because the content is delivered with the interrupt, the need for IRQ lines is removed (making the total system limit of MSIs equal to the number of interrupt vectors, not IRQ lines), as is the need for a driver ISR to query the device for data related to the interrupt, decreasing latency. Due to the large number of device interrupts available through this model, this effectively nullifies any benefit of sharing interrupts, decreasing latency further by directly delivering the interrupt data to the concerned ISR.
Finally, MSI-X, an extension to the MSI model, which is introduced in PCI 3.0, adds support for 32-bit messages (instead of 16-bit), a maximum of 2048 different messages (instead of just 32), and more importantly, the ability to use a different address (which can be dynamically determined) for each of the MSI payloads. Using a different address allows the MSI payload to be written to a different physical address range that belongs to a different processor, or a different set of target processors, effectively enabling nonuniform memory access (NUMA)-aware interrupt delivery by sending the interrupt to the processor that initiated the related device request. This improves latency and scalability by monitoring both load and closest NUMA node during interrupt completion.
*****
Now practice.
Checking for PCI devices working in MSI-mode.
Go to Device Manager. Click in menu «View -> Resources by type». Expand «Interrupt request (IRQ)» node of the tree. Scroll down to «(PCI) 0x… (…) device name» device nodes. Devices with positive number for IRQ (like «(PCI) 0x00000011 (17) …») are in Line-based interrupts-mode. Devices with negative number for IRQ (like «(PCI) 0xFFFFFFFA (-6) …») are in Message Signaled-based Interrupts-mode.
Trying to switch device to MSI-mode manually.
You must locate device`s registry key. Invoke device properties dialog. Switch to «Details» tab. Select «Device Instance Path» in «Property» combo-box. Write down «Value» (for example «PCI\VEN_1002&DEV_4397&SUBSYS_1609103C&REV_00\3&11583659&0&B0»). This is relative registry path under the key «HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\».
Go to that device`s registry key («HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI\VEN_1002&DEV_4397&SUBSYS_1609103C&REV_00\3&11583659&0&B0») and locate down the subkey «Device Parameters\Interrupt Management». For devices working in MSI-mode there will be subkey «Device Parameters\Interrupt Management\MessageSignaledInterruptProperties» and in that subkey there will be DWORD value «MSISupported» equals to «0x00000001». To switch device from legacy- to MSI-mode just add these subkey and value.
Before adding these key and value (or changing «MSISupported» to «0x00000001» in case subkey and value already exist) you have to perform safety steps like doing backup (creating system restore point at least).
Do tweak one device -> reboot and check (1) if it is displayed in Device Manager as correctly working device; (2) if its IRQ became negative -> if no (1) and no (2) then either remove subkey «MessageSignaledInterruptProperties» (if you added it) or change «MSISupported» to «0x00000000» and reboot.
Theoretically if device driver (and platform = chipset) unable to perform in MSI-mode it should ignore mentioned subkey and value. But who knows…
Trying to switch device to MSI-mode with MSI utility v3 (run as administrator)
MD5 hash for zip-file: C08D7AE2FFF3052FD801F6BF33831D08
https://web.archive.org/web/20240807182525/https://forums.guru3d.com/threads/windows-line-based-vs-message-signaled-based-interrupts-msi-tool.378044/
https://www.virustotal.com/gui/file/695800afad96f858a3f291b7df21c16649528f13d39b63fb7c233e5676c8df6f
Куратор(ы):
eLfiK
Автор | Сообщение | |||
---|---|---|---|---|
|
||||
Member Статус: Не в сети |
1. Ликбез по прерываниям. Все прерывания делятся по следующим приоритетам: 2. Ссылки. https://forums.guru3d.com/threads/windows-line-based-vs-message-signaled-based-interrupts-msi-tool.378044/ 3. Борьба с прерываниями. https://github.com/denis-g/windows10-latency-optimization Позднее дополню каждый раздел. SMI-прерывания зависят от BIOS/UEFI и оборудования. Про прерывания на уровне ядра и пользователя в windows. В Windows применяется: При этом: Наш пользовательский процесс может иметь следующие приоритеты: Итоговый приоритет потока — это сумма приоритетов процесса и потока. Программы для оценки прерываний: ETW xperf WPA — родной софт от microsoft Настройка прерываний https://www.wagnardsoft.com/content/Download-Intelligent-standby-list-cleaner-ISLC-1034 Борьба с прерываниями. Первое и самое главное. Для 120 Гц: Снизить частоту опроса мыши до 125Гц. Главные правила для таймеров: useplatformclock disables TSC and uses the platform source clock instead (HPET or PMT). PMT is used when HPET is disabled in BIOS. При этом возможны разные комбинации таймеров. TSC + TSC without desync: bcdedit /set useplatformtick no (отключаем RTC и включаем TSC для тиков) Обсуждение проблем ОС и оборудования: задержка реакции системы (latency), микроcтаттер, инпутлаг, фризы. Осуществлять мониторинг программой Latency Monitor нужно в течение 1 минуты, в состоянии простоя системы т.е. без дисковой, сетевой активности, и любой другой, с выключенным ав и приложениями в трее и автозагрузке, Презентация NVIDIA (на англ.) о проблемах статтеров, фризов и лагов (терминология, описание и причины возникновения)
|
Реклама | |
Партнер |
FreyFOx |
|
Member Статус: Не в сети |
tauRUS9292 писал(а): Можно для тупых разъяснить? Что это к как конкретно делать? сам без понятия,где то с 93 страницы этой темы инфа есть про это |
rbk93 |
|
Junior Статус: Не в сети |
Я оффнул в биосе C-states и теперь точно фиксированные частоты стали 3.79гц не двигаются) У меня максималка у проца 3.9-4.0гц в бусте,получается из того что оффнул c-states уже частоты не будут больше 3.79гц? k2viper писал(а): И в винде при помощи MSI_util_v2 (гуглим) перевести максимум устройств в MSI mode. Если какое-либо устройство после переключения работает некорректно, возвращаем его назад в IRQ режим снимая галочку. Можете в двух словах написать если не сложно) в чем разница между msi и irq,для чего вообще используют эти переключения и обязательно это делать? Добавлено спустя 3 минуты 2 секунды: OLD Hunter писал(а): поставить 1000Гц на мышке, купить 144-240Гц монитор (ну или как выше говорят хотя бы до 75 разогнать, если у вас 60) Я ставил 1000гц тоже вижу сильный разброс по частотам. А так у меня моник на 144гц)) ну чувствительность мышки просто не понятная иногда бывает такое ощущение что она плавает… |
krasnov77 |
|
Member Статус: Не в сети |
rbk93 писал(а): ну чувствительность мышки просто не понятная иногда бывает такое ощущение что она плавает… ускорение выключить. |
lampa |
|
Member Статус: Не в сети |
rbk93 а что за мышь, название напишите? Фпс в игре сколько? Какая игра? У меня то же, после того как офнул Ц-стэйты в биосе частота зафиксировалась на 3.6, а раньше бустилась на 3.8 Но падения производительности я не заметил. Даже AIDA64 тебе баллы показывает. |
mendex55 |
|
Member Статус: В сети |
Доброго времени суток всем!! тоже давно мучали проблемы фризов в играх еще заметил такую вещь ,а именно разговор про напряжения vccio vccsa,многие вижу их любят задирать чуть выше стандартных значений |
OLD Hunter |
|
Member Статус: Не в сети |
rbk93 писал(а): Я ставил 1000гц тоже вижу сильный разброс по частотам. Если речь про тест выше то это абсолютная норма. rbk93 писал(а): ну чувствительность мышки просто не понятная иногда бывает такое ощущение что она плавает… Если такое везде, включая раб. стол и оффлайн игры — возможно проблема в «грязном» электричестве, то что из розетки — к такому выводу недавно пришли на форуме нвидиа и фиксят это дорогими сетевыми фильтрами. |
rbk93 |
|
Junior Статус: Не в сети |
krasnov77 писал(а): ускорение выключить. про то что аксель надо оффать в винде это же дефолт и его все знают) lampa писал(а): а что за мышь, название напишите? Фпс в игре сколько? Какая игра? У меня то же, после того как офнул Ц-стэйты в биосе частота зафиксировалась на 3.6, а раньше бустилась на 3.8 Но падения производительности я не заметил. Даже AIDA64 тебе баллы показывает. steelseries sensei 310 из новых) да с фпс в играх норм, я просто слышал что это от винды зависит плавность мыши… у кого старые версии там вроде лучше. Добавлено спустя 7 минут 4 секунды: OLD Hunter писал(а): Если такое везде, включая раб. стол и оффлайн игры — возможно проблема в «грязном» электричестве, то что из розетки — к такому выводу недавно пришли на форуме нвидиа и фиксят это дорогими сетевыми фильтрами. Да тесты которые выше,Вы считаете не каких отклонений нет?) Я просто не знаю как оно может показывать. Добавлено спустя 3 минуты 10 секунд: |
k2viper |
|
Member Статус: Не в сети |
rbk93 писал(а): Можете в двух словах написать если не сложно) в чем разница между msi и irq,для чего вообще используют эти переключения и обязательно это делать? В двух — MSI режим более современный, IRQ режим это legacy режим работы драйверов с прерываниями. Матчасть: https://forums.guru3d.com/threads/windo … ts.378044/ rbk93 писал(а): ну чувствительность мышки просто не понятная иногда бывает такое ощущение что она плавает… Мышь (сенсор) и ковёр чистить пробовали? mendex55 писал(а): важный момент..HPET в биосе ВКЛЮЧЕН! с выключенным хуже..вот такие вот чудеса,возможно и поможет кому Винда какая? При отсутствующем параметре useplatformclock Windows 10 должна использовать TSC в сочетании с одним из легаси таймеров, а при отключении HPET в биосе использовала бы только TSC. Проверьте внимательнее, все таки при отключенном в биосе HPET должно быть лучше. Добавлено спустя 1 минуту 42 секунды: mendex55 писал(а): так вот все стало идеально плавно и в винде и в играх, ни фризов ни дропов фпс не замечаю уже больше недели А если ещё с умом почистите систему от ненужного резидентного софта, поотключаете драйвера устройств которых у вас нет через Autoruns, лишние службы винды, будет вообще песня а не система |
mendex55 |
|
Member Статус: В сети |
k2viper писал(а): Винда какая? При отсутствующем параметре useplatformclock Windows 10 должна использовать TSC в сочетании с одним из легаси таймеров, а при отключении HPET в биосе использовала бы только TSC. Проверьте внимательнее, все таки при отключенном в биосе HPET должно быть лучше. так вот в том то и дело,что должно,но на самом деле HPET в биос у меня именно включен ,а не наоборот,сам удивляюсь,но результат есть и своим глазам я верю k2viper писал(а): А если ещё с умом почистите систему от ненужного резидентного софта, поотключаете драйвера устройств которых у вас нет через Autoruns, лишние службы винды, будет вообще песня а не система ну все лишнее я и так поотключал а паранойей в виде вырезанием телеметрии и прочей мишуры я как то не страдаю,система меня вполне устраивает |
rbk93 |
|||
Junior Статус: Не в сети |
Все девайсы перевел в msi,через latency увидел что задержка по меньше стала
|
k2viper |
|
Member Статус: Не в сети |
rbk93 писал(а): Кто знает что значит если в столбике irq показывает «минус число» Ни то ни другое, эта колонка показывает текущее значение IRQ у устройства, а минус просто значит что драйвер устройства уже работает в MSI mode. Если вы откроете обычный виндовый диспетчер устройств и проверите там закладку «Ресурсы» у соответствующих устройств, увидите в строке IRQ те же цифры с минусом. |
rbk93 |
|
Junior Статус: Не в сети |
k2viper писал(а): Ни то ни другое, эта колонка показывает текущее значение IRQ у устройства, а минус просто значит что драйвер устройства уже работает в MSI mode. Если вы откроете обычный виндовый диспетчер устройств и проверите там закладку «Ресурсы» у соответствующих устройств, увидите в строке IRQ те же цифры с минусом. Спасибо за пояснение) |
leetSmithy |
|
Member Статус: Не в сети |
Вопрос: на MSI B450 Carbon при отключенном в БИОСе HPET система просто не стартует с холодного запуска (это известный момент для этой серии), имеет ли смысл через диспетчер устройств высокочастотный таймер отключать? Спасибо. |
OLD Hunter |
|
Member Статус: Не в сети |
rbk93 писал(а): Да тесты которые выше,Вы считаете не каких отклонений нет?) Да, в них всё нормально. dpc можно сократить конечно, но ничего кроме красивых циферок не даст. rbk93 писал(а): Еще не знаете как понять что с электричеством проблемки?! Вроде как только осцилографом и нужен очень толковый электрик. Про «мышку» которая «плавает» снова не ответили. Она плавает где? Везде, включая раб стол и офлайн игры или только в сетевых стрелялках? |
rbk93 |
|
Junior Статус: Не в сети |
OLD Hunter писал(а): Вроде как только осцилографом и нужен очень толковый электрик. Про «мышку» которая «плавает» снова не ответили. Она плавает где? Везде, включая раб стол и офлайн игры или только в сетевых стрелялках? Сори не заметил,ну вроде как везде мышка так себя введет сложно однозначно сказать,может действительно сетевой фильтр нужен) |
Alex TOPMAN |
|
Member Статус: Не в сети |
rbk93 писал(а): там вроде как Сетевой фильтр нужно покупать (чтобы держать стабильную частоту 50гц что ле) поправьте если я не правильно написал. Еще не знаете как понять что с электричеством проблемки?! Сетевой фильтр даёт только начальную защиту. Самый простой «лечит» только от overload и overvoltage. Для большего нужен стабилизатор. Он уже сгладит гуляния частоты в разных пределах. От цены будет зависеть насколько хорошо сгладит (с высокочастотными шумами справиться не так легко). Лучше всех с этой работой справляются дорогие инверторные (за подробностями почему — гуглите мат. часть, здесь это будет уже оффтоп). Очень многие наивно полагают, что стабилизацией напряжения занимаются и сами блоки питания ПК. Нет, от слова «совсем» (конкуренция — штука жестокая, а нужен стабилизатор далеко не всем домохозяйкам). Если грубо — БП только преобразуют 220в в 12в, 5в и 3.3в. Поэтому, часто, у кого разгон — ловят «непонятные» бсоды, фризы и пр. глюки. Я сам был из таких года до 2012. |
OLD Hunter |
|
Member Статус: Не в сети |
rbk93 писал(а): Сори не заметил,ну вроде как везде мышка так себя введет сложно однозначно сказать,может действительно сетевой фильтр нужен) а когда так стало? Или это эпизодически или кажется что должно быть плавнее? Ведь вы с чем то сравниваете поведение мыши. Можете почитать вот эту тему еще, последние 10 страниц думаю хватит https://forums.geforce.com/default/topi … ng-me/294/ Все завсегдатаи фиксят свои инпут лаги и плавающие мыши вот этой штукой Furman M-10x E . Уж не знаю реально помогает или очередное плацебо. Вещь достаточно интересная, но дорогая, имхо. Где-то натыкался на фото в разборе, в ней вроде ничего особенного нет. Если кто разбирается и подскажет аналоги в районе 2к, я бы купил |
rbk93 |
|
Junior Статус: Не в сети |
OLD Hunter писал(а): а когда так стало? Или это эпизодически или кажется что должно быть плавнее? Ведь вы с чем то сравниваете поведение мыши. Можете почитать вот эту тему еще, последние 10 страниц думаю хватит https://forums.geforce.com/default/topi … ng-me/294/ Да всегда так было,раньше просто значения не предавал… щас начал гуглить и выяснил что такие симптомы не есть хорошо) Это вроде как в старых домах наблюдается такой баг:D плохое заземление. В новых домах такого нету. Я так понял они на свой страх и риск покупают эту штуковину,для диагностики ведь электрик нужен |
Olegdjus |
|
Moderator Статус: Не в сети |
Немного DPC в равных условиях Фиксировал пиковые, ну и так понятно |
altovod |
|
Member Статус: Не в сети |
Olegdjus А в ощущениях есть разница? Фризы-плавность? |
—
Кто сейчас на конференции |
Сейчас этот форум просматривают: BOBKOC, Tutmos и гости: 8 |
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете добавлять вложения |