Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 06-30-2009, 04:52 AM   #1
LQ Newbie
Registered: Jun 2009
Posts: 6

Rep: Reputation: 0
Question jiffies value in 2.4 and 2.6 kernels

Hi Folks,

I just came to know that jiffies intialised to -5 minutes in 2.6 kernels,whereas it was zero, basically it will report the uptime from last boot.

1.Why this has been changed to -5 minutes in 2.6?
2.If the application is written using 2.4 kernels using the times,then wht are all the things we need to consider before porting it to 2.6 kernels.
3. Also i see that do_div is returning the rem,that means it always returns
one of the values from the range 0-base,this is wht we intended for?

If there are any previous posts related to this,please point me them.
Please let me know.

Old 06-30-2009, 11:06 AM   #2
LQ Newbie
Registered: Oct 2004
Location: korea
Posts: 11

Rep: Reputation: 0
> 1.Why this has been changed to -5 minutes in 2.6?

It is for finding jiffies bug as soon as possibile.

If jiffies initialize to 0, it will overflow after about 50days(HZ=1000, 32bit integer jiffies). However if the jiffies sets to -300000, it will overflow after 5 minutes.
So, if you do not check the jiffies properly, you can find out the kernel bug just in 5 minutes. (The kernel provides some macros like time_after and time_before for handling wraparound)
Old 07-01-2009, 01:46 AM   #3
LQ Newbie
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thumbs up

Thanks Kuru!

Can anyone reply to other issues i have raised?



call, kernel, times

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
About jiffies? m1n Linux - Newbie 1 02-27-2009 10:23 AM
Tick, jiffies and time interpolation Kirilla Linux - Kernel 1 02-27-2009 09:04 AM
Jiffies Rawjoe Linux - Kernel 5 08-08-2006 08:42 AM
Kernel compiling problem, connected with jiffies.h zWaR Linux - Software 2 03-01-2006 06:30 PM
How jiffies get updated? iikent Linux - Newbie 3 03-13-2004 09:36 AM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:14 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration