From: Andy Lutomirski <luto@amacapital.net>
To: wilson self <wself00@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: VDSO gettimeofday() x86_64 linux 3.2
Date: Tue, 16 Oct 2012 12:24:46 -0700 [thread overview]
Message-ID: <507DB47E.5090003@mit.edu> (raw)
In-Reply-To: <CAAZUjxCvK0QnwnZP_FBiO2JM1rMoEA3HLjKAcYD14cxdGWyg4Q@mail.gmail.com>
On 10/16/2012 11:09 AM, wilson self wrote:
> I noticed recently that my get time of day calls are quite a bit
> slower than I would have expected; and it would see that a likely
> cause is that they are not going via vdso, but rather a system call.
>
> In older kernels there was kernel.vsyscall64 parameter to enable them,
> but this seems to be gone in later kernel releases. What config
> option or parameter might I be missing that could cause gettimeofday()
> to use the fallback methods?
That option is gone because it's treated as unconditionally true. What
does /sys/devices/system/clocksource/clocksource0/current_clocksource
say? The usual cause of this problem is a clocksource other than tsc or
hpet. hpet is amazingly slow, though, and arguably the hpet vdso code
could be deleted because the syscall overhead is the least of your
worries if you're using the hpet for timing.
(Also, if you're doing the call yourself instead of using libc, make
sure you're using the vdso and not the old vsyscall. The vsyscall (call
direct to 0xffffffffff600000) is the slowest possible way to read the
time -- it's several times slower than the syscall on my box. This is
mostly intentional.
--Andy
next prev parent reply other threads:[~2012-10-16 19:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 18:09 VDSO gettimeofday() x86_64 linux 3.2 wilson self
2012-10-16 19:24 ` Andy Lutomirski [this message]
2012-10-16 19:33 ` wilson self
2012-10-16 19:39 ` Andy Lutomirski
2012-10-16 19:43 ` wilson self
2012-10-16 21:36 ` Andy Lutomirski
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=507DB47E.5090003@mit.edu \
--to=luto@amacapital.net \
--cc=linux-kernel@vger.kernel.org \
--cc=wself00@gmail.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 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.