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 17:11:27 +0200 [thread overview]
Message-ID: <20160623151127.GA20808@rei.lan> (raw)
In-Reply-To: <20160623135803.636.qmail@ns.sciencehorizons.net>
Hi!
> Two points:
> 1) sigtimedwait() is unusual in that it uses the jiffies timer. Most
> system call timeouts (including specifically the one in FUTEX_WAIT)
> use the high-resolution timer subsystem, which is a whole different
> animal with tighter guarantees, and
That is likely POSIX conformance bug, since POSIX explicitly states that
sigtimedwait() shall use CLOCK_MONOTONIC to measure the timeout.
"If the Monotonic Clock option is supported, the CLOCK_MONOTONIC clock
shall be used to measure the time interval specified by the timeout
argument."
> 2) The worst-case error in tglx's proposal is 1/8 of the requested
> timeout: the wakeup is after 112.5% of the requested time, plus
> one tick. This is well within your requested accuracy. (For very
> short timeouts, the "plus one tick" can dominate the percentage error.)
Hmm, that still does not add up to the number in the original email
where it says time_elapsed: 1.197057. As far as I can tell the worst
case for a tick is CONFIG_HZ=100 so one tick is 0.01s and even after
that we get 118.7% since we requested 1s. But that may be caused by the
fact that the test uses gettimeofday() to measure the elapsed time, it
should use CLOCK_MONOTONIC instead.
--
Cyril Hrubis
chrubis@suse.cz
WARNING: multiple messages have this Message-ID (diff)
From: Cyril Hrubis <chrubis@suse.cz>
To: George Spelvin <linux@sciencehorizons.net>
Cc: tglx@linutronix.de, arjan@infradead.org, clm@fb.com,
edumazet@google.com, fweisbec@gmail.com, lenb@kernel.org,
linux-kernel@vger.kernel.org, ltp@lists.linux.it,
mingo@kernel.org, paulmck@linux.vnet.ibm.com,
peterz@infradead.org, riel@redhat.com, rt@linutronix.de,
torvalds@linux-foundation.org, umgwanakikbuti@gmail.com
Subject: Re: [LTP] [patch V2 00/20] timer: Refactor the timer wheel
Date: Thu, 23 Jun 2016 17:11:27 +0200 [thread overview]
Message-ID: <20160623151127.GA20808@rei.lan> (raw)
In-Reply-To: <20160623135803.636.qmail@ns.sciencehorizons.net>
Hi!
> Two points:
> 1) sigtimedwait() is unusual in that it uses the jiffies timer. Most
> system call timeouts (including specifically the one in FUTEX_WAIT)
> use the high-resolution timer subsystem, which is a whole different
> animal with tighter guarantees, and
That is likely POSIX conformance bug, since POSIX explicitly states that
sigtimedwait() shall use CLOCK_MONOTONIC to measure the timeout.
"If the Monotonic Clock option is supported, the CLOCK_MONOTONIC clock
shall be used to measure the time interval specified by the timeout
argument."
> 2) The worst-case error in tglx's proposal is 1/8 of the requested
> timeout: the wakeup is after 112.5% of the requested time, plus
> one tick. This is well within your requested accuracy. (For very
> short timeouts, the "plus one tick" can dominate the percentage error.)
Hmm, that still does not add up to the number in the original email
where it says time_elapsed: 1.197057. As far as I can tell the worst
case for a tick is CONFIG_HZ=100 so one tick is 0.01s and even after
that we get 118.7% since we requested 1s. But that may be caused by the
fact that the test uses gettimeofday() to measure the elapsed time, it
should use CLOCK_MONOTONIC instead.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-06-23 15:11 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 13:26 [patch V2 00/20] timer: Refactor the timer wheel Thomas Gleixner
2016-06-17 13:26 ` [patch V2 01/20] timer: Make pinned a timer property Thomas Gleixner
2016-06-17 13:26 ` [patch V2 02/20] x86/apic/uv: Initialize timer as pinned Thomas Gleixner
2016-06-17 13:26 ` [patch V2 03/20] x86/mce: " Thomas Gleixner
2016-06-17 13:26 ` [patch V2 04/20] cpufreq/powernv: " Thomas Gleixner
2016-06-17 13:26 ` [patch V2 05/20] driver/net/ethernet/tile: " Thomas Gleixner
2016-06-21 18:14 ` Peter Zijlstra
2016-06-17 13:26 ` [patch V2 06/20] drivers/tty/metag_da: " Thomas Gleixner
2016-06-17 13:26 ` [patch V2 07/20] drivers/tty/mips_ejtag: " Thomas Gleixner
2016-06-17 13:26 ` [patch V2 08/20] net/ipv4/inet: Initialize timers " Thomas Gleixner
2016-06-17 13:26 ` [patch V2 09/20] timer: Remove mod_timer_pinned Thomas Gleixner
2016-06-17 13:26 ` [patch V2 10/20] hlist: Add hlist_is_singular_node() helper Thomas Gleixner
2016-06-17 13:26 ` [patch V2 11/20] timer: Give a few structs and members proper names Thomas Gleixner
2016-06-17 13:26 ` [patch V2 12/20] timer: Switch to a non cascading wheel Thomas Gleixner
2016-06-18 9:55 ` George Spelvin
2016-06-24 10:06 ` Thomas Gleixner
2016-06-17 13:26 ` [patch V2 13/20] timer: Remove slack leftovers Thomas Gleixner
2016-06-17 13:26 ` [patch V2 14/20] timer: Move __run_timers() function Thomas Gleixner
2016-06-17 13:26 ` [patch V2 15/20] timer: Optimize collect timers for NOHZ Thomas Gleixner
2016-06-17 13:26 ` [patch V2 16/20] tick/sched: Remove pointless empty function Thomas Gleixner
2016-06-17 13:26 ` [patch V2 17/20] timer: Forward wheel clock whenever possible Thomas Gleixner
2016-06-17 13:26 ` [patch V2 18/20] timer: Only wake softirq if necessary Thomas Gleixner
2016-06-17 13:26 ` [patch V2 19/20] timer: Split out index calculation Thomas Gleixner
2016-06-17 13:26 ` [patch V2 20/20] timer: Optimization for same expiry time in mod_timer() Thomas Gleixner
2016-06-17 13:48 ` [patch V2 00/20] timer: Refactor the timer wheel Eric Dumazet
2016-06-17 13:57 ` Thomas Gleixner
2016-06-17 14:25 ` Eric Dumazet
2016-06-20 13:56 ` Thomas Gleixner
2016-06-20 14:46 ` Arjan van de Ven
2016-06-20 14:46 ` Thomas Gleixner
2016-06-20 14:49 ` Arjan van de Ven
2016-06-20 19:03 ` Rik van Riel
2016-06-21 2:48 ` Eric Dumazet
2016-06-17 14:26 ` Arjan van de Ven
2016-06-20 15:05 ` Paul E. McKenney
2016-06-20 15:13 ` Thomas Gleixner
2016-06-20 15:41 ` Paul E. McKenney
2016-06-22 7:37 ` Mike Galbraith
2016-06-22 8:44 ` [LTP] " Thomas Gleixner
2016-06-22 8:44 ` Thomas Gleixner
2016-06-22 9:06 ` [LTP] " Mike Galbraith
2016-06-22 9:06 ` Mike Galbraith
2016-06-22 13:37 ` [LTP] " Mike Galbraith
2016-06-22 13:37 ` Mike Galbraith
2016-06-22 10:28 ` [LTP] " Cyril Hrubis
2016-06-22 10:28 ` Cyril Hrubis
2016-06-23 8:27 ` Thomas Gleixner
2016-06-23 8:27 ` Thomas Gleixner
2016-06-23 11:47 ` Cyril Hrubis
2016-06-23 11:47 ` Cyril Hrubis
2016-06-23 13:58 ` George Spelvin
2016-06-23 14:10 ` Thomas Gleixner
2016-06-23 14:10 ` Thomas Gleixner
2016-06-23 15:11 ` Cyril Hrubis [this message]
2016-06-23 15:11 ` Cyril Hrubis
2016-06-23 15:21 ` Thomas Gleixner
2016-06-23 15:21 ` Thomas Gleixner
2016-06-23 16:31 ` Cyril Hrubis
2016-06-23 16:31 ` Cyril Hrubis
2016-06-26 19:00 ` Pavel Machek
2016-06-26 19:21 ` [LTP] " Arjan van de Ven
2016-06-26 19:21 ` Arjan van de Ven
2016-06-26 20:02 ` Pavel Machek
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=20160623151127.GA20808@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.