From: Arun Sharma <asharma@fb.com>
To: John Stultz <john.stultz@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andy Lutomirski <luto@amacapital.net>,
Kumar Sundararajan <kumar@fb.com>,
Richard Cochran <richardcochran@gmail.com>,
"H. Peter Anvin" <hpa@linux.intel.com>
Subject: Re: clock_gettime_ns
Date: Thu, 5 Sep 2013 10:15:39 +0530 [thread overview]
Message-ID: <52280C73.9080209@fb.com> (raw)
In-Reply-To: <CANcMJZAv_-nGkjt8r8cp+BhnSfhL2roKZpodN+vLKfmpTVLhrQ@mail.gmail.com>
On 9/5/13 12:47 AM, John Stultz wrote:
> If we're going to add a new interface that uses something other then a
> timespec, we likely need to put some serious thought into that new
> type, and see how it could be used across a number of syscalls. Some
> of the discussion around dealing with the 2038 issue touched on this.
[ I know you're not asking for perf data, but may be useful for new
readers ]
Here's the benchmarking I did in 2011:
http://thread.gmane.org/gmane.linux.kernel/1233758/focus=1233781
Switching from timespec to s64 was worth 21%. My experience over the
years is that this performance delta causes userspace guys to implement
their own TSC based timers, against the advice from kernel developers.
http://code.ohloh.net/search?s=wall%20now%20tsc%20hz&pp=0&fl=C&fl=C%2B%2B&ff=1&mp=1&ml=1&me=1&md=1&filterChecked=true
I worry that trying to solve other clock problems will cause the kernel
to continue to pass the time in memory instead of registers, giving the
userspace TSC based implementations a reason to exist.
-Arun
prev parent reply other threads:[~2013-09-05 5:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 9:18 clock_gettime_ns Arun Sharma
2013-09-04 18:51 ` clock_gettime_ns Andy Lutomirski
2013-09-04 19:20 ` clock_gettime_ns John Stultz
2013-09-04 20:33 ` clock_gettime_ns Andy Lutomirski
2013-09-04 20:54 ` clock_gettime_ns John Stultz
2013-09-04 22:29 ` clock_gettime_ns H. Peter Anvin
2013-09-04 22:59 ` clock_gettime_ns John Stultz
2013-09-04 23:04 ` clock_gettime_ns H. Peter Anvin
2013-09-04 23:20 ` clock_gettime_ns John Stultz
2013-09-04 23:38 ` clock_gettime_ns Andy Lutomirski
2013-09-05 1:22 ` clock_gettime_ns H. Peter Anvin
2013-09-09 17:47 ` clock_gettime_ns Andy Lutomirski
2013-09-11 18:50 ` clock_gettime_ns Richard Cochran
2013-09-04 19:17 ` clock_gettime_ns John Stultz
2013-09-04 20:23 ` clock_gettime_ns Andy Lutomirski
2013-09-04 20:50 ` clock_gettime_ns John Stultz
2013-09-05 4:45 ` Arun Sharma [this message]
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=52280C73.9080209@fb.com \
--to=asharma@fb.com \
--cc=hpa@linux.intel.com \
--cc=john.stultz@linaro.org \
--cc=kumar@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=richardcochran@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox