Yury Polyanskiy 940370fc86 hangcheck-timer: fix x86_32 bugs
drivers/char/hangcheck-timer.c is doubly broken.  When the overflown value
of TIMER_FREQ is abnormally low, it spams the syslog with KERN_CRIT
messages "Hangcheck: hangcheck value past margin!" But whether it happens
or not depends on HZ and lpj in a complex way.  People have hit it
occasionally as far as google search can tell.

First, the following line overflows unsigned long:

# define TIMER_FREQ (HZ*loops_per_jiffy)

Second, and more importantly, loops_per_jiffy has little to do with the
con= version from the the time scale of get_cycles() (aka rdtsc) to the
time scale of jiffies.

The attached patch resolves both of the problems.

Acked-by: Joel Becker <joel.becker@oracle.com>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Jan Glauber <jan.glauber@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25 08:07:02 -07:00
..
2009-09-24 07:21:03 -07:00
2010-05-17 09:08:18 +10:00
2010-04-23 02:08:44 +02:00
2010-05-17 03:06:12 +02:00
2010-05-21 09:34:29 -07:00
2009-12-10 22:55:36 +01:00
2010-05-21 09:34:29 -07:00
2010-05-21 09:34:29 -07:00
2009-07-12 12:22:34 -07:00
2010-05-20 19:55:01 +10:00
2009-07-12 12:22:34 -07:00
2010-05-21 09:34:31 -07:00
2009-07-12 12:22:34 -07:00
2009-09-01 01:13:31 -07:00
2009-10-14 17:36:53 +02:00
2010-01-04 12:31:21 -08:00
2010-03-02 14:43:22 -08:00
2010-02-09 11:13:56 +01:00