The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: Lee Revell <rlrevell@joe-job.com>
Cc: linux-os@analogic.com, Olivier Croquette <ocroquette@free.fr>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.11 timeval_to_jiffies() wrong for ms resolution timers
Date: Thu, 26 May 2005 12:24:34 -0700	[thread overview]
Message-ID: <42962272.9060506@mvista.com> (raw)
In-Reply-To: <1117131568.5477.12.camel@mindpipe>

Lee Revell wrote:
> On Thu, 2005-05-26 at 14:10 -0400, Richard B. Johnson wrote:
> 
>>The time for a sleeping (waiting) task to get the CPU is much
>>greater than the jitter. Once in the ISR, some wake-up call
>>is "scheduled" and the interrupt returns. A CPU hog may have
>>been using the CPU when the interrupt occurred. It will continue
>>to use the CPU until its time-slot (quantum) has expired. This
>>could be a whole millisecond if HZ is 1000, 10 milliseconds if
>>100. It's only then that your sleeping task gets awakened
>>by the interrupting event.
>>
>>So, accurate waking up is not guaranteed on any multi-user,
>>multitasking system because you don't know what a user has
>>been doing with the CPU. On a dedicated machine, one can
>>have tasks that are most always sleeping or waiting for
>>I/O so, the latency can come way down. However, signaling
>>a task, based upon some time will never be very accurate
>>anywhere.
> 
> 
> Not quite, if your sleeping task has higher priority than the CPU hog it
> will preempt the CPU hog immediately on return from the interrupt.
> Unless you've disabled preemption of course, which would be stupid in
> this case.

And even then the task would need to be in the kernel and would be preempted 
when it exits the kernel.


-- 
George Anzinger   george@mvista.com
HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/

  reply	other threads:[~2005-05-26 19:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25 19:06 2.6.11 timeval_to_jiffies() wrong for ms resolution timers Davda, Bhavesh P (Bhavesh)
2005-05-25 20:02 ` George Anzinger
2005-05-25 21:41   ` Thomas Gleixner
2005-05-26 17:04   ` Olivier Croquette
2005-05-26 18:10     ` Richard B. Johnson
2005-05-26 18:19       ` Lee Revell
2005-05-26 19:24         ` George Anzinger [this message]
2005-05-26 19:32           ` Lee Revell
  -- strict thread matches above, loose matches on Subject: below --
2005-05-25 19:16 Davda, Bhavesh P (Bhavesh)
2005-05-24 22:59 Bhavesh P. Davda
2005-05-25 17:21 ` George Anzinger
2005-05-25 17:37   ` Chris Friesen
2005-05-25 17:54     ` George Anzinger
2005-05-25 18:07       ` Chris Friesen

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=42962272.9060506@mvista.com \
    --to=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    --cc=ocroquette@free.fr \
    --cc=rlrevell@joe-job.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