Hi,
My greetings
to all the enlightened Linux Souls.
I
got all the mail ids from one of Linux based mail chain/URL http://www.linux-mips.org/archives/linux-mips/2006-05/msg00193.html
Pls
guide me on the usage of
INITIAL_JIFFIES.
In the source
of linux kernel \include\linux\jiffies.h there is code like
this
/*
* Have the 32 bit jiffies value wrap 5 minutes after boot
* so jiffies wrap bugs show up earlier.
*/
#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))
* Have the 32 bit jiffies value wrap 5 minutes after boot
* so jiffies wrap bugs show up earlier.
*/
#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))
This sets the initial jiffies value to 0x00000000fffb6c20, which can trigger 32-bit wraparound bugs .It is an offset to the jiffies counter,so that it begins from a large value instead of zero. So the wrap-around happens earlier,making it possible to detect any counter wrap-around bugs much quicker regardless of the HZ setting.
1.Suppose I
want to simulate the jiffies wraparound after 30 mins(1800sec) of reboot.Can I
change code as below in kernel?
#define
INITIAL_JIFFIES ((unsigned long)(unsigned int) (-1800*HZ))
u64
jiffies_64 = INITIAL_JIFFIES;
2.How
to verify/test that wraparound has happened?
Regards
Chandan