mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Simon White" <s_a_white@email.com>
To: linux-kernel@vger.kernel.org
Subject: Best Kernel Timers?
Date: Wed, 28 Sep 2005 04:36:02 -0500	[thread overview]
Message-ID: <20050928093602.DFA0B8401C@ws1-5.us4.outblaze.com> (raw)

Hi,

Wondered if anyone could provide information about where to look for
suitable kernel timers?

For a while I have been working on supporting the hardsid/catweasel
cards on Linux (and Windows).  Although undesirable the original
implementations required real usec delays in the OS
(this requirement being fixed in the very latest hardware).  I know
Linux is not realtime so the original drivers were designed to
queue hardware writes to a realtime thread that busy waited and
recovered as best it could from errors (on the whole this worked
pretty well).  Also another version of the code was written to use
rtlinux/rtai that was capable of non busy waiting.

More recently with the release of the new buffering hardware the
driver was redesigned from the realtime posix code.  Due to these
changes the busy waiting (for the old cards) can nolonger occur
and the delays have to happen asynchronusly notifing the realtime
thread when the delay has expired.  The code uses the posix
timer_set, etc calls with realtime clock with absolute delays and
flags a semaphore when the signal occurs (works great under
realtime systems).

Now as an alternative it is again desired that a version (although
wont perfectly work) be available to a vanilla 2.6 kernel (possibly
2.4) with similiar limitations as before.  Its a shame the posix
calls appear to not be supported in kernel for drivers so I have
wrapped the calls for semaphores/mutexs/threads to kernel
equivalents.

However I have no idea what to do for the timers.  Is there
something suitable inkernel that would provide an async callback
to pre-empt a realtime thread and provide better resolution than
HZ a far amount of the time?  Or do I have to run a seperate lower
priority busy waiting thread to wakeup the realtime one?

Advice appreciated.
Simon

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


             reply	other threads:[~2005-09-28  9:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-28  9:36 Simon White [this message]
2005-09-28  9:53 ` Steven Rostedt
2005-09-28 17:33 ` Christoph Lameter
2005-09-28 10:08 Simon White
2005-09-28 11:17 ` Steven Rostedt
2005-09-28 17:34 ` Christoph Lameter
2005-09-28 11:55 Simon White

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=20050928093602.DFA0B8401C@ws1-5.us4.outblaze.com \
    --to=s_a_white@email.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®