lkml.org 
[lkml]   [2005]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Needed faster implementation of do_gettimeofday()
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/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:1.535 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site