[Top] [All Lists]

Need your help on setting of INITIAL_JIFFIES

To: <>, <>, <>, <>, <>, <>, <>
Subject: Need your help on setting of INITIAL_JIFFIES
Date: Fri, 20 May 2011 09:09:23 +0100
Original-recipient: rfc822;
Thread-index: AcwWxThn48Xgik5gR02qz1dlNwbj2Q==
Thread-topic: Need your help on setting of INITIAL_JIFFIES
My greetings to all the enlightened Linux Souls.
 I got all the mail ids from one of Linux based mail chain/URL
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))
 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?
<Prev in Thread] Current Thread [Next in Thread>
  • Need your help on setting of INITIAL_JIFFIES, MOHANTY CHANDAN-WJKD64 <=