LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 06-30-2009, 03:52 AM   #1
Bandlaraj
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.

Thanks
bandlaraj
 
Old 06-30-2009, 10:06 AM   #2
kuru
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, 12:46 AM   #3
Bandlaraj
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?

Thanks
bandlaraj
 
  


Reply

Tags
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 09:23 AM
Tick, jiffies and time interpolation Kirilla Linux - Kernel 1 02-27-2009 08:04 AM
Jiffies Rawjoe Linux - Kernel 5 08-08-2006 07:42 AM
Kernel compiling problem, connected with jiffies.h zWaR Linux - Software 2 03-01-2006 05:30 PM
How jiffies get updated? iikent Linux - Newbie 3 03-13-2004 08:36 AM


All times are GMT -5. The time now is 02:16 AM.

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