4.1.20-bone20 image repeatedly hangs for a few seconds every few seconds

Hi,

I have built a custom image kernel_version 4.1.20-bone20 from Robert Nelson. The image repeatedly hangs for a few seconds every few seconds. Stops responding to keyboard input. This little program shows it. It prints the time through the loop. The sleep makes it at least 0.2 seconds. Same program shows no problem in previous custom kernel image built with 3.8

Note that the problem mostly occurs about every 4 lines. 10*0.2 sec per line → every 8 seconds.

Could you pls help on what could be the issue with this custom image version 4.1?

#! /usr/bin/python
from time import sleep
from time import time as ttime
x = ttime()
c = 0
while 1 :
sleep(.2)
xo = x
x = ttime()
print '%1.2f ’ % (x-xo),
c += 1
if c >= 10 :
print
c = 0

root@arm:~/bbinstall# ./resptest
0.21 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 4.05 0.20 0.20 0.20 0.20 1.29 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 3.88 0.20 0.20 0.20 0.20 1.28 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 3.87 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 1.26 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 3.87 0.20 0.20 0.20 0.20 1.32 1.26 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 6.46 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 1.31 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 3.87 0.20
0.20 0.20 1.35 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 6.45 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 1.21 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 6.62 0.20 0.20 0.20 0.20 1.35 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 3.90 0.20 0.20 0.20 0.20 0.20 0.20 1.34
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20
0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20 0.20

Thanks,
Veera

Does switching to the performance governor help?

*sudo cpufreq-set -g performanc*e

Regards,