All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: "Ulrich Windl" <ulrich.windl@rz.uni-regensburg.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.15:kernel/time.c: The Nanosecond and code duplication
Date: 13 Feb 2006 11:12:32 +0100	[thread overview]
Message-ID: <p73ek274lf3.fsf@verdi.suse.de> (raw)
In-Reply-To: <43F05143.29965.5D3E74@Ulrich.Windl.rkdvmks1.ngate.uni-regensburg.de>

"Ulrich Windl" <ulrich.windl@rz.uni-regensburg.de> writes:

> but there's no POSIX like syscall interface 
> (clock_getres, clock_gettime, clock_settime) yet.

% grep clock include/asm-x86_64/unistd.h 
#define __NR_clock_settime      227
__SYSCALL(__NR_clock_settime, sys_clock_settime)
#define __NR_clock_gettime      228
__SYSCALL(__NR_clock_gettime, sys_clock_gettime)
#define __NR_clock_getres       229
__SYSCALL(__NR_clock_getres, sys_clock_getres)
#define __NR_clock_nanosleep    230
__SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep)

Has been available for quite some time.

However the calls are currently slower than gettimeofday and also
don't use nanoseconds internally in all cases (depends on the architecture), 
but still microseconds.  But I'm not sure it matters that much
because the underlying timers are often not better than microseconds
anyways and with nanoseconds you start to time even the inherent system
call latency.



-Andi

  reply	other threads:[~2006-02-13 10:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-13  8:28 2.6.15:kernel/time.c: The Nanosecond and code duplication Ulrich Windl
2006-02-13 10:12 ` Andi Kleen [this message]
2006-02-13 14:49   ` Ulrich Windl
2006-02-13 11:47 ` Roman Zippel
2006-02-13 21:11 ` Christoph Lameter
2006-02-14  6:57   ` Ulrich Windl

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=p73ek274lf3.fsf@verdi.suse.de \
    --to=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ulrich.windl@rz.uni-regensburg.de \
    /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.