lkml.org 
[lkml]   [2005]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Sub jiffy delay?
From
Date
On Wed, 2005-11-23 at 15:39 -0500, Rick Niles wrote:
> I need to service a piece of hardware about every 400-500
> microseconds, but I really don't want to change the value of HZ, which
> in my version of the 2.6 kernel is 1000. The hardware doesn't have an
> interrupt so the nasty hack I've been doing is to service the hardware
> repeatedly in a loop for about 600 microseconds by watching the
> do_gettimeofday(), set a timer for the next jiffy and repeat. This leaves less than 400 microseconds / millisecond for the kernel and anything else on the system to run.
>
> Obviously, this sucks, but it does work. I am working with the
> hardware guy to add an interrupt to the hardware. However, I don't
> want every user of the hardware without the interrupt to have to
> rebuild the kernel with a different value of HZ. So does anyone have
> any better ideas on what I can do?

Have you looked at Thomas Gleixner's ktimer/HRT patches. It gives you a
way to set a timer to go off within a jiffy.

http://tglx.de/ktimers.html

-- Steve


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-23 22:23    [W:2.639 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site