Messages in this thread |  | | Date | Fri, 6 Oct 2000 01:00:59 +0200 | | From | Jamie Lokier <> | | Subject | Re: [patch] enabling APIC and NMI watchdog on UP systems |
| |
Philip J. Mucci wrote: > Basically, reading the counters is a 2 step process: read the mmapped > virtual counters and add that to the contents of rdpmc(). This means > that (at least for the x86 series) the kernel interface only needs to > 'guard' access to the MSR to make sure the user doesn't set up anything > pathological. This same kind of interface is also possible for the > UltraSparc. For other systems where a lower IPL is required, the > interface needs to be a fast-path syscall interface.
That sounds similar to the vsyscall interface Ingo's been working on. Why not use the read-only kernel page used for fast gettimeofday() calibration with MSR offsets?
It's slightly more overhead than inlining the code, but it is still only a small overhead (no kernel entry, just a function call to code in a user-readable page). People doing advanced dynamic compilation techniques can always trace the vsyscall code and inline equivalent code directly into their hot paths ;-)
-- Jamie - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |