Wait a second (hopefully less)

Published on November 20, 2012

Archived Notice

This article has been archived and may contain broken links, photos and out-of-date information. If you have any questions, please Contact Us.

It's amazing how multiple paths often lead to the same place. We've been tracking a couple of issues and recently that seem to have the same remedy.

For the impatient:

If you're seeing inconsistent ping times or sporadic stalls in the startup of your userspace, the enable_wait_mode=off kernel parameter might fix the issue.

U-Boot> setenv bootargs $bootargs enable_wait_mode=off U-Boot> saveenv && boot

The details:

The two issues are these:

  • The Android stall issue discussed in the post about our recent Android release, and
  • An issue with inconsistency in ping times.
The first we narrowed down to a stall in a call to rcu_barrier in the Linux filesystem code:

The second caused intermittent ping times:

root@freescale:~/$ ping -i.2 -c1000 ... 1000 packets transmitted, 1000 received, 0% packet loss, time 200010ms rtt min/avg/max/mdev = 0.124/64.579/199.945/82.149 ms Both of these issues are addressed by enable_wait_mode=off. That kernel parameter changes around the kernel idle loop to run in clocked mode instead of unclocked, power-off mode.

With this change in place, we haven't seen either the Android stall and ping times are consistently below 1ms.

We've only run crude measurements of input power consumption, but only saw ~10mA increase on the 5V supply.