Implications of setting enable_wait_mode=off in 3.0.35

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Implications of setting enable_wait_mode=off in 3.0.35

Jump to solution
4,992 Views
johnw
Contributor III

A search of this community for "enable_wait_mode" reveals a number of posts, all of which point to or advise that  "enable_wait_mode=off" be set in the kernel command line for i.MX6.

Obviously the next question is, what does this do?  Well, the answer seems to be quite a lot.  It disables some functionality that Freescale added in 3.0.35 related to the way that the device handles interrupts during some power mode state changes.

Here is the latest commit that I believe affects this:

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/arch/arm/mach-mx6/system.c?h=imx_...

The author of the commit describes it this way:

“Add the new WAIT mode workaround added for MX6Q1.2 and MX6DLTO1.1. A new bit is added to CCM_CGPR (bit 17). This bit needs to be enabled for the WAIT mode fix to be active and needs to be disabled before the system enters STOP mode with power gating enabled. Fix WAIT mode bug when system is in low power IDLE mode: In low power IDLE mode (AHB @ 24MHz), switch ARM to run from 24MHz on MX6QTO1.1 and MX6DLTO1.0 chips when ARM core enters WAIT mode. We still need to use the ARM:IPG_CLK ratio of 12:5. Since IPG_CLK is at 12MHz, we need to run ARM below 28.8MHz.”

That’s pretty much over my head at this point, without further research.  But, what I gather is this.  You can turn off the workaround using enable_wait_mode=off (it is on by default), and that has led others to see that some of their network latency issues are fixed.  I’m not sure *why* this is.  It seems to affect how the Linux idle loop works and it does seem to pertain to a feature introduced in TO1.2.

So - here are my questions:

- Is setting enable_wait_mode=off an acceptable long term solution?  If so, why is this functionality even in the kernel?

- If it is not, then is Freescale looking into the issues that we are seeing with network latency when WAIT mode is enabled by default?


0 Kudos
1 Solution
1,489 Views
AnsonHuang
NXP Employee
NXP Employee

Hi,

     To answer your questions as below:

     1. enable_wait_mode=off is to let user has an options of turning off WAIT mode feature, such as when you suspect that some modules' performance are impacted by WAIT mode, then you can try to disable WAIT mode. The WAIT mode is a feature to gating ARM clock during idle, as you pasted, some early TOs has some issues of this feature, so we have software workarounds implemented in BSP, but it will bring some performance impact. If you didn't care about the CPU power consumption in idle, you can just disable WAIT mode. But later TOs already have hardware fix about WAIT mode. There will be no software workaround needed. But I believe for now, you can just let WAIT mode always enabled, just as by default.

     2. For the network latency, I believe that you are saying when WAIT mode is enabled, the ENET's performance are impacted a lot, right? If you look into our latest 4.0.0 BSP release, not sure whether you can download it from external website now, if not, please be patient, you will see we already have solutions to fix that in this release.

View solution in original post

0 Kudos
2 Replies
1,490 Views
AnsonHuang
NXP Employee
NXP Employee

Hi,

     To answer your questions as below:

     1. enable_wait_mode=off is to let user has an options of turning off WAIT mode feature, such as when you suspect that some modules' performance are impacted by WAIT mode, then you can try to disable WAIT mode. The WAIT mode is a feature to gating ARM clock during idle, as you pasted, some early TOs has some issues of this feature, so we have software workarounds implemented in BSP, but it will bring some performance impact. If you didn't care about the CPU power consumption in idle, you can just disable WAIT mode. But later TOs already have hardware fix about WAIT mode. There will be no software workaround needed. But I believe for now, you can just let WAIT mode always enabled, just as by default.

     2. For the network latency, I believe that you are saying when WAIT mode is enabled, the ENET's performance are impacted a lot, right? If you look into our latest 4.0.0 BSP release, not sure whether you can download it from external website now, if not, please be patient, you will see we already have solutions to fix that in this release.

0 Kudos
1,489 Views
johnw
Contributor III

Thanks Yongcai.  That is very helpful.  I can see that FSL has made a lot of commits to the git repository for rev 4.0.0. http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.0.35_4.0.0

And there are some commits to it that reflect a change in the interrupt handling for ethernet when WAIT mode is enabled.

0 Kudos