From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [patch V2 00/20] timer: Refactor the timer wheel
Date: Thu, 23 Jun 2016 13:47:59 +0200 [thread overview]
Message-ID: <20160623114759.GA19250@rei.lan> (raw)
In-Reply-To: <alpine.DEB.2.11.1606231024220.5839@nanos>
Hi!
> > While this is true, checking with reasonable error margin works just
> > fine 99% of the time. You cannot really test that timer expires, without
> > setting arbitrary margin.
>
> Err. You know that the timer expired because sigtimedwait() returns
> EAGAIN. And the only thing you can reliably check for is that the timer did
> not expired to early. Anything else is guesswork and voodoo programming.
There is quite a lot of things that can happen on mutitasking OS and
there are even NMIs in hardware, etc. But seriously is there a reason
why OS that is not under heavy load cannot expire timers with reasonable
overruns? I.e. if I ask for a second of sleep and expect it to be woken
up not much more than half of a second later?
If we stick only to guarantees that are defined in POSIX playing music
with mplayer would not be possible since it sleeps in futex() and if it
wakes too late it will fail to fill buffers. In practice this worked
fine for me for years.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-06-23 11:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160617121134.417319325@linutronix.de>
[not found] ` <1466581044.3188.34.camel@gmail.com>
2016-06-22 8:44 ` [LTP] [patch V2 00/20] timer: Refactor the timer wheel Thomas Gleixner
2016-06-22 9:06 ` Mike Galbraith
2016-06-22 13:37 ` Mike Galbraith
2016-06-22 10:28 ` Cyril Hrubis
2016-06-23 8:27 ` Thomas Gleixner
2016-06-23 11:47 ` Cyril Hrubis [this message]
[not found] ` <20160623135803.636.qmail@ns.sciencehorizons.net>
2016-06-23 14:10 ` Thomas Gleixner
2016-06-23 15:11 ` Cyril Hrubis
2016-06-23 15:21 ` Thomas Gleixner
2016-06-23 16:31 ` Cyril Hrubis
[not found] ` <20160626190025.GC11162@amd>
2016-06-26 19:21 ` Arjan van de Ven
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=20160623114759.GA19250@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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