This has some problems:
- old CPUs that don't have a TSC, so you need a fall back.
- the standard TSC counts interrupts and bottom halves too. It would
be unfair to charge them to a process (I believe the SMP scheduler in 2.2
has the same problem)
I think you can do user mode only cycle counting using some performance
counter MTRRs on newer CPUs, but this gets really Vendor and Processor Type
dependent. Also it should work on non IA32 CPUs too.
On the rest I have no opinion.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/