lkml.org 
[lkml]   [2004]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Patch to 2.6.8.1-mm2 to allow multiple NMI handlers to be registered
On Fri, 20 Aug 2004 18:42:05 -0400 (EDT), Zwane Mwaikambo wrote:
>On Thu, 19 Aug 2004, John Levon wrote:
>
>> On Thu, Aug 19, 2004 at 11:16:28AM -0500, Corey Minyard wrote:
>>
>> > >Please use rdpmc() instead of rdmsr() when reading counter registers.
>> > >Ditto in the other places.
>> > >(I know oprofile doesn't, but that's no excuse.)
>>
>> I actually have no idea why we don't use rdpmc().
>
>If i recall, not all the performance counters were accessible via rdpmc
>and being slower.

rdpmc can read any counter's value in kernel mode, on all
x86 processors supported by oprofile (P6, P4, K7, K8).
On early steppings of the Pentium Pro it's necessary to
disable user-space use of rdpmc due to an erratum, but
there's no problem with using rdpmc in kernel-mode. Early
P5s don't have rdpmc, but they are irrelevant for oprofile.

Using rdpmc to read a counter is universally faster than doing
it with rdmsr. perfctr has benchmarking data to back this up;
see etc/costs/ in recent perfctr packages for details.

However, rdpmc can't read the counters' control registers.
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.026 / U:2.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site