From: Brian Bloniarz <bmb@athenacr.com>
To: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: gettimeofday() time warps on Nehalem
Date: Fri, 19 Jun 2009 11:12:40 -0400 [thread overview]
Message-ID: <4A3BAAE8.3030606@athenacr.com> (raw)
I've been using time-warp-test from
http://people.redhat.com/mingo/time-warp-test/ and have some confusing results.
My machine is a IBM 3550M2 Nehalem box, kernel 2.6.30. time-warp-test.c finds
time warps in gettimeofday() and clock_gettime(CLOCK_MONOTONIC). TEST_TSC does
not find any timewarps from rdtsc.
Thought I'd ask Ingo & LKML before I dive deeper. Is this a kernel issue,
time-warp-test issue, or a problem with my machine? Do you expect
time-warp-test's TEST_TOD to pass on new kernels? I was under the impression
that the TSC clocksource protected against time warps in gettimeofday().
Thanks,
Brian Bloniarz
$ uname -a
Linux lab5 2.6.30-nehalem #1 SMP Fri Jun 12 11:18:50 EDT 2009 x86_64 GNU/Linux
$ head -24 /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 26
model name : Intel(R) Xeon(R) CPU L5520 @ 2.27GHz
stepping : 5
cpu MHz : 2266.822
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 11
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology tsc_reliable nonstop_tsc pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm dca sse4_1 sse4_2 lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips : 4533.64
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
$ cat /sys/devices/system/clocksource/clocksource0/current_clocksource
tsc
$ ./time-warp-test
16 CPUs, running 16 parallel test-tasks.
checking for time-warps via:
- gettimeofday (TOD) syscall (usec resolution)
new TOD-warp maximum: -1 usecs, 00046cb465acb046 -> 00046cb465acb045
new TOD-warp maximum: -2 usecs, 00046cb465ad7515 -> 00046cb465ad7513
TOD: 0.26us, fail:21534 \
next reply other threads:[~2009-06-19 15:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-19 15:12 Brian Bloniarz [this message]
2009-06-19 22:34 ` gettimeofday() time warps on Nehalem Brian Bloniarz
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=4A3BAAE8.3030606@athenacr.com \
--to=bmb@athenacr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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