mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
To: Rick Niles <niles@rickniles.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Sub jiffy delay?
Date: Wed, 23 Nov 2005 15:50:44 -0500	[thread overview]
Message-ID: <20051123205044.GL9488@csclub.uwaterloo.ca> (raw)
In-Reply-To: <200511232039.PAA03184@bellona.cnchost.com>

On Wed, Nov 23, 2005 at 03:39:17PM -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?

Use the RTC interrupt generator perhaps (if you have one)?  Call the
hardware people nasty things to tell them how dumb it is to make
hardware that requires frequent service without an efficient way to tell
the system when to do this.  Polling is never efficient, although it is
sometimes faster (although not usually in my experience). :)  After all
how did they think you were going to use the hardware?

Len Sorensen

  reply	other threads:[~2005-11-23 20:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-23 20:39 Rick Niles
2005-11-23 20:50 ` Lennart Sorensen [this message]
2005-11-23 21:20 ` Steven Rostedt
2005-11-23 22:07 ` linux-os (Dick Johnson)
2005-11-24 15:11   ` Rick Niles

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051123205044.GL9488@csclub.uwaterloo.ca \
    --to=lsorense@csclub.uwaterloo.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niles@rickniles.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®