Re: gettimeofday resolution seriously degraded in test9

From: Chris Friesen (cfriesen_at_nortelnetworks.com)
Date: 10/30/03

  • Next message: bd: "Re: Post-halloween doc updates."
    Date:	Thu, 30 Oct 2003 17:50:37 -0500
    To: root@chaos.analogic.com
    
    

    Richard B. Johnson wrote:

    > There isn't any magic that can solve this problem. It turns out
    > that with later Intel CPUs, one can get CPU-clock resolution
    > from rdtsc. However, this is hardware-specific. If somebody
    > modifies the gettimeofday() and the POSIX clock routines to
    > use rdtsc when available, a lot of problems will go away.

    Its not just x86. PowerPC has a similar call, so does MIPS, and I'm
    sure most other modern cpus do too.

    The only problem with this stuff is that they usually slow down when the
    cpu does, so laptops and other power-managed chips cause complexities.

    Chris

    -- 
    Chris Friesen                    | MailStop: 043/33/F10
    Nortel Networks                  | work: (613) 765-0557
    3500 Carling Avenue              | fax:  (613) 765-2986
    Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com
    -
    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/
    

  • Next message: bd: "Re: Post-halloween doc updates."

    Relevant Pages

    • Re: High resolution timer.
      ... It should run on Windows and Linux so there is no Win32 API. ... The first thing to use is RDTSC. ... What about multiple CPUs. ...
      (comp.lang.asm.x86)
    • Re: [PATCH] [5/20] x86: Introduce nsec_barrier()
      ... to avoid races with timer interrupts on other CPUs. ... Except for x86 it is a nop right now. ... On CPUs without SSE there is generally no RDTSC ... That's most likely wrong unless you added two barriers -- the barriers ...
      (Linux-Kernel)
    • Re: QueryPerformanceFrequency
      ... While rdtsc is one possible implementation, on some CPUs/systems the QPC needs to be implemented in a more complex manner ... I would definitely not recommend using rdtsc directly - it was quite a common practice in game programming to do this a few years back, and games which did it are experiencing serious compatibility issues recently. ... Alex Blekhman napsal: ...
      (microsoft.public.vc.language)
    • Re: [PATCH] [5/20] x86: Introduce nsec_barrier()
      ... to avoid races with timer interrupts on other CPUs. ... only tested x86, but it's a very simple change. ... On CPUs without SSE there is generally no RDTSC ...
      (Linux-Kernel)
    • Re: spinaphore conceptual draft
      ... If you ask on two CPUs in a quick succession, ... and the order of two close RDTSC instructions isn't ... > kind of cycle counter. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)