LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-16-2004, 01:31 AM   #1
G35Coupe
LQ Newbie
 
Registered: Nov 2004
Posts: 1

Rep: Reputation: 0
Question Need to disable timer or all interrupts from user space


I'm not sure if this is the right place to ask this question but here you go.

I have implemented a very fast (8KHz loops) PID controller in user
space. I am getting the time from gettimeofday(). I use usleep to
complete the loop (125us).
When I dump the time values, I have loops that are over 125us. The
system is soft_RT (99.9% it is within 125us). However, every 1sec I
have very long loops (400us) and other 200us loops move often.
I think these are due to the timer interrupt. Timer interrupt is
suppose to be every 10ms in my kernel version (2.4.18). But somehow
it needs longer servicing once every second.
So, in order to get rid of these, I think I need to make a kernel
loadable module and that I can call to disable timer interrupt from
user space, then make another call to enable the timer interrupt
(maybe even disable/enable all interrupts). The
problem is I have not written KLM before. It seems that it is easy
to do in this case. But I don't know how to make the module
accessible from user space (how to make the call the
mydisable/myenable). If anyone has done this and has it handy, it
will be a lot of help!
Also, since my control loops is dependant from micro-second time
resolution, I am afraid that when I re-enable the timer interrupt, I
may have time "jumps". Is this true? BTW, I will have to disable the
timer interrupt close 5-20sec!!! This is the time it take for the
stage I control to move from one end to the other.
I hope my problem is clear!

Help is greatly appreciated!

System:
Single board VME 800MHZ processor PC
no Xwindows, no Network, basically nothing but my program
Process is set as highest priority in user space.

Last edited by G35Coupe; 11-16-2004 at 03:05 AM.
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 01:32 PM
How to disable swap space entry for a process (Sticky bit?) Pandamatak Linux - General 3 09-25-2006 07:17 PM
how can i get ip from icq ..if the user disable the see ip SlackwareMan Linux - Security 2 08-19-2004 06:45 AM
User Space - Kernel Space basu_arani Programming 3 05-25-2004 12:46 PM
disable user login ust Linux - General 2 04-01-2004 01:06 PM


All times are GMT -5. The time now is 02:11 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