Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.
1723 Discussions

Need help with SMI, Intel Core i5-1135G7 CPU, and SMI induced latencies.

_devin_
Beginner
1,876 Views

Hello,

 

This is a repost of the following question, but to the Software category:

https://community.intel.com/t5/Processors/Need-help-with-SMI-Intel-Core-i5-1135G7-CPU-and-SMI-induced/td-p/1299776

 

I believe that this is a hardware question but I'm hopeful to see if anyone in the Software category can help me instead. The above post (in Hardware Products) as well as a separate support ticket have both instructed me to repost this to the Software category on the Forums. It seems that the software group has quite the reputation for solving difficult problems :-).

 

Of the software sub-categories, it looks like "Software Tuning, Performance Optimization" is most applicable as my goal is to remove/reduce latencies caused by Dell laptops. The same Intel CPU (i5 1135G7) on another laptop has no latencies, which is why I suspect that this is caused by Dell's BIOS and/or hardware implementation.

 

Here's a copy of the original information/questions (slightly modified for clarity):

------------------------------------------------------------------------------

I have two laptops:

  • Lenovo ThinkBook Gen 2
  • Dell Latitude 5420

Both laptops have an Intel Core i5-1135G7 CPU.

I'm monitoring SMI (System Management Interrupts) by reading MSR register 0x34 (SMI Counter). I assume that this counter can only be incremented when there's an SMI.

The Lenovo laptop is not generating any SMI when running our real-time application. The Dell is generating an SMI roughly every 14.648 seconds. Both laptops have the same bits set in the SMI Control and Enable register (SMI_EN, offset 0x30):

  • 28: eSPI SMI Enable (ESPI_SMI_EN)
  • 13: TCO Enable (TCO_EN)
  • 1: End of SMI (EOS)
  • 0: Global SMI Enable (GBL_SMI_EN)

The latency caused by the SMI on the Dell is usually over 1 ms (i.e. the OS and all our application code pauses during this time).

As a side note, I can also see this latency when running the Intel BIOS Implementation Test Suite (BITS) SMI Latency test. On the Lenovo, there's zero SMI and the latency is <150 us so it passes the test. Based on other testing, the latency on the Lenovo appears to be about 7 us with this type of SMI Latency test. The same SMI Latency test fails on the Dell and has one SMI. The latency on the Dell is over 2 ms when running the BITS SMI Latency test. If I modify the BITS SMI Latency test to run for a shorter duration, for example, only 3 seconds instead of 15 seconds, then it's possible to run it on the Dell laptop between the SMIs. When this happens, then the test shows zero SMI and a latency of about 5 us.

Some preliminary questions are:

- Is the SMI Counter (MSR register 0x34) only incremented when there is an SMI?

- Is there a way to determine the cause of an SMI? Since only TCO and eSPI are enabled, it must be one of them but is there a way to determine which one?

- Is TCO SMI only used for Watch Dog Timers (WDT)? If it generates an SMI then should I expect the system to reboot in that case? I don't have any WDT drivers enabled that would be utilizing the TCO SMI. Should TCO SMIs be disabled by default unless some driver sets it up?

- The SMI seems to occur periodically every ~14.648 seconds. Could that give me any more clues about the cause?

- I've never used eSPI before but it looks like a bus. Is there a way to query/determine what's on the bus that might be causing these SMI?

- It looks like the TCO SMI is enabled and locked so that I cannot disable it. Is there a similar mechanism for eSPI that is preventing me from disabling the eSPI SMI via the SMI Control and Enable register (SMI_EN, offset 0x30)?

I guess that's it for now. Any other guidance/advice would be appreciated. I've created a case with Dell but it doesn't seem to be going anywhere (yet). Ideally, I would like to remove/prevent the periodic SMI on the Dell laptop.

------------------------------------------------------------------------------

 

Thanks,
Devin

0 Kudos
2 Replies
mts-01
Beginner
278 Views

Did you ever get a resolution on this?  These intel processors are driving me crazy, one will SMI, another will not, and it seems like it must be a national secret as to how to determine the source.  Frustrating when even Intel cannot tell you how to root cause this issue.

0 Kudos
_devin_
Beginner
252 Views

I never got any support from Intel or Dell on these SMI issues.

 

We're using QNX on these x86 64 bit laptops and it doesn't have any ACPI support. So we've been rolling our own ACPI support based on ACPICA (https://github.com/acpica/acpica).

 

At least with all of the Dell Latitude laptops (i.e. 5420, 5430, 5440, and 5450) we get SMIs without ACPI. If we run our ACPI implementation then the SMIs stop. My guess is the laptops are trying to do something relating to power/thermal management and if it can't accomplish its goals through ACPI (i.e. callback mechanisms to run within the OS) then it'll force it through SMI (by pausing the OS and everything else). Alternatively, perhaps something in ACPI is telling the laptop's firmware that it'll take care of something so the firmware disables what it's trying to do (i.e. no need for SMIs now, ACPI will take care of this for us).

 

I can't explain why you have one laptop that has SMI and one that doesn't have SMI unless they are different makes/models. Before our ACPI implementation, we would usually have Lenovo laptops without SMI and Dell laptops with SMI (with the same Intel CPU). If your devices are the same make/model then the only advice I can offer is to check if they are running with the same BIOS settings and OS/ACPI implementation. We were unable to conclude that any specific BIOS settings were causing these SMI but we didn't exhaustively test every permutation of BIOS settings either. My gut feeling is that there's nothing you can do in BIOS (especially Dell BIOS) to help disable/prevent SMIs.

 

For a few years we were avoiding Dell laptops completely because of this issue but luckily we can use them now due to our implementation of ACPICA on QNX.

 

There is still one exception to this though. These laptops with Type C USB power still generate SMI when the power connector is disconnected/reconnected. We have not yet found a way around this but it's not much of an impact on us as our systems are usually used with power connected. I have yet to see an SMI on any laptop that has a barrel power connector disconnected/reconnected.

0 Kudos
Reply