[Linux-ia64] Re: Confused about fsystemcalls

Peter Chubb
2003-01-30T04:31:19Z

>>>>> "David" = David Mosberger <davidm@napali.hpl.hp.com> writes:

>>>>> On Thu, 30 Jan 2003 11:07:51 +1100, Peter Chubb <peter@chubb.wattle.id.au> said:
Peter> The mygetpid() call appears to return the correct value.

Peter> Our figures show over an average of ten runs: --- glibc
Peter> getpid() takes 579 cycles, stddev 24 --- mygetpid takes 1468
Peter> cycles, stddev 286

David> Have you tried on a McKinley? The numbers you quote for the
David> standard getpid() look like for Merced. I never tried on
David> Merced, though I don't know of why it shouldn't work fast, off
David> hand.

Worked it out -- one needs to call the mygetpid() function twice, once
before the timing stuff, and once during, so we don't count the
time to get the gate page into the TLB and into the cache.

Timings are now 177 cycles for the mygetpid() routine as opposed to
570 for glibc (all on Itanium 1), and we're now working on
gettimeofday().

Peter C