Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all: I have a user mode application which uses nanosleep in a while(1) loop, unfortunately it brings a huge amount of local time interrupts, which greatly damage the application ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    8

    HELP: nanosleep causes huge amount of local timer interrupts


    Hi all:
    I have a user mode application which uses nanosleep in a while(1) loop, unfortunately it brings a huge amount of local time interrupts, which greatly damage the application performance, I don't know why nanosleep can cause this large increase on local timer interrupts?? How should I do to eliminate this unwanted interrupts. Thanks for your help.

  2. #2
    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,452
    Every call to nanosleep() will generate one or more interrupts in the kernel. Doing this in a while(true) loop is guaranteed to bring your system to its knees... What are you trying to accomplish. Tell us that, and maybe we can help you do it in a bit less intrusive manner.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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