Re: Enabling RDPMC in user space by default

From: Zwane Mwaikambo (zwane_at_arm.linux.org.uk)
Date: 11/30/05

  • Next message: Roman Zippel: "Re: [PATCH 1/9] timer locking optimization"
    Date:	Tue, 29 Nov 2005 18:39:32 -0800 (PST)
    To: Andi Kleen <ak@suse.de>
    
    

    Hi Andi,

    On Tue, 29 Nov 2005, Andi Kleen wrote:

    > I'm considering to enable CR4.PCE by default on x86-64/i386. Currently it's 0
    > which means RDPMC doesn't work. On x86-64 PMC 0 is always programmed
    > to be a cycle counter, so it would be useful to be able to access
    > this for measuring instructions. That's especially useful because RDTSC
    > does not necessarily count cycles in the current P state (already
    > the case on Intel CPUs and AMD's future direction seems to also
    > to decouple it from cycles) Drawback is that it stops during idle, but
    > that shouldn't be a big issue for normal measuring. It's not useful
    > as a real timer anyways.

    Some processor implementations don't have a performance counter which
    ticks during the idle thread either.

    > Any comments on this?

    I think that this should be best left to a profiling tool to configure and
    not a general kernel facility. I also have very little faith in processor
    vendors not doing to performance counters what was done to the TSC.

            Zwane

    -
    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: Roman Zippel: "Re: [PATCH 1/9] timer locking optimization"

    Relevant Pages

    • Re: MAP_SHARED bizarrely slow
      ... its behaviour i'm pretty sure that early in the pipeline they use the ... virtual address to match a virtual tag and procede with that data as if ... then you can watch some p4 take up to 3000 cycles per reference. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] remove redundant NULL pointer checks prior to calling kfree() in fs/nfsd/
      ... ORing a value with itself and jumping on condition is ... "jumping on condition" can easily be 100+ cycles, ... Pushing a value onto the stack otoh ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [ckrm-tech] Re: [Lse-tech] [PATCH] cpusets - big numa cpu and memory placement
      ... > are somebody's going to come and take away at least the cycles and maybe ... In some of the worlds my customers live in, they have been hit so many ... soon show up to make use of those lost cycles, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Memory mapped IO vs Port IO
      ... > writeq(val, reg) time: 64 cycles ... Surely the outl in the if cannot be faster than the pure outl()? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: kjournald wasting CPU in invert_lock fs/jbd/commit.c
      ... > I noticed that the code in commit.c of the jbd system can waste CPU ... So it's basically just wasting CPU cycles here. ... Maybe we should dump that silly schedule() and just do cpu_relax. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)