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 ...
- 10-09-2011 #1Just 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.
- 10-10-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
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!


Reply With Quote