I just wanted to inform Rik of this small problem. Since he's going
to fiddle with stats, he can fix this on the way.
BTW, the bug is easily triggered on SMP kernel, very hard to see
(but definitely happens) with UP, I bet you'll see it on preempt too.
Try these two scripts:
#!/bin/sh
# Prints dots until bad thing happens
# Prints old_idle_cnt -> new_idle_cnt then
prev=0
while true; do cat /proc/stat; done | \
grep -F 'cpu ' | \
cut -d ' ' -f 6 | \
while read next; do
echo -n .
diff=$(($next-$prev))
if test $diff -lt 0; then
echo "$prev -> $next"
fi
prev=$next
done
#!/bin/sh
# Prints cpu line from /proc/stat repeatedly
# When bad thing happens, flags it by '<<<'
prev=0
while true; do cat /proc/stat; done | \
grep -F 'cpu ' | \
while read line; do
next=`echo "$line" | cut -d ' ' -f 6`
diff=$(($next-$prev))
if test $diff -lt 0; then
echo "$line <<<"
else
echo "$line"
fi
prev=$next
done
-- vda - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/