From: George Anzinger <george@mvista.com>
To: Parag Warudkar <kernel-stuff@comcast.net>
Cc: puneet_kaushik@persistent.co.in, linux-kernel@vger.kernel.org
Subject: Re: Needed faster implementation of do_gettimeofday()
Date: Mon, 21 Feb 2005 19:06:37 -0800 [thread overview]
Message-ID: <421AA1BD.7020706@mvista.com> (raw)
In-Reply-To: <200502201048.01424.kernel-stuff@comcast.net>
Parag Warudkar wrote:
> On Sunday 20 February 2005 05:58 am, puneet_kaushik@persistent.co.in wrote:
>
>>985913 8.6083 vmlinux mark_offset_tsc
>>584473 5.1032 libc-2.3.2.so getc
>
>
> What makes you think mark_offset_tsc is slow? Do you have any comparative
> numbers? It might just be that the workload you are throwing at it justifies
> it. (For e.g. if your workload does a zillion system calls, system_call will
> show up as a hot spot in oprofile - doesn't necessarily mean it is slow -
> it's just overused.) Can you post the relevant code?
He really is right. Mark offset is reading the PIT counter and that is not only
rather dumb but dog slow.
A suggestion, try the high res timers patch. Even if you don't use the timers
the mark offset there is MUCH faster. It does not read the PIT.
The difference is where we assume the jiffie bump is in time. If we assume it
is at the point that the PIT interrupts, well then the only way to get to that
is to read the PIT. If, on the other hand, we assume it is at the time after
the interrrupt where we mark offset, we can observe the "best" time for this
event based on the TSC and avoid reading the PIT.
Try the HRT patch (see signature below) and see if if doesn't do better.
--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
next prev parent reply other threads:[~2005-02-22 3:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-20 10:58 Needed faster implementation of do_gettimeofday() puneet_kaushik
2005-02-20 15:48 ` Parag Warudkar
2005-02-22 3:06 ` George Anzinger [this message]
2005-02-22 13:56 ` Puneet Kaushik
2005-02-22 15:46 ` Chris Friesen
2005-02-22 16:44 ` George Anzinger
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=421AA1BD.7020706@mvista.com \
--to=george@mvista.com \
--cc=kernel-stuff@comcast.net \
--cc=linux-kernel@vger.kernel.org \
--cc=puneet_kaushik@persistent.co.in \
/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