Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I would like to know the kernel jiffies. I'm facing problem when I've created timer with expiry value set from jiffies global variable. Thanks in advance. Athiraj J...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    6

    Kernel Jiffies


    Hi,

    I would like to know the kernel jiffies. I'm facing problem when I've created timer with expiry value set from jiffies global variable.

    Thanks in advance.

    Athiraj J

  2. #2
    Just Joined!
    Join Date
    Jul 2011
    Posts
    16
    Your question is like I would like to go to some where, how can i go?.

    Explain what you would like to know about jiffies and what is your problem

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,755
    I'd suggest that you look at kernel code that incorporates jiffies in their timeing. The i2c driver is a good example. It uses them extensively in its timers to determine when a line goes high or low.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2011
    Posts
    10
    Jiffies are not seconds. its count of number of ticks. jiffies /HZ will result in no of seconds. if you want to add 5 seconds for the current time then you have to add like this 5_seconds = jiffies + ( 5 * HZ ). which will be your 5 sec time out value.

  6. #5
    Just Joined!
    Join Date
    Oct 2011
    Posts
    6
    Hi,

    Thanks for all your reply. I would like to understand how jiffies will work in linux and how can we incorporate for making timer expiry as 5 sec..

    Regards,
    Athiraj J

  7. #6
    Just Joined!
    Join Date
    Oct 2011
    Posts
    6
    Hi,

    Thanks for your response. I'm not clear about one thing you have mentioned. for 5 sec delay, jiffies/HZ has to set. That is jiffies / 5 HZ have to give or what????

    Regards,
    Athiraj J

  8. #7
    Just Joined!
    Join Date
    Jan 2011
    Posts
    10
    Hi Athiraj,

    there is some thing called ticks in system.
    and no of ticks per second is called HZ.

    so jiffies will be in ticks and if you divide with HZ, you'll get in seconds.

    for more details read Linux Device Drivers

    Best Regards,
    Sudheer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •