lkml.org 
[lkml]   [2009]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: perf_counter Atom patch
    From
    Hi,

    On Tue, Jun 23, 2009 at 5:38 AM, Wang, Yong Y<yong.y.wang@intel.com> wrote:
    >> From: stephane eranian [mailto:eranian@googlemail.com]
    >>
    >> I would like to better understand what makes you think
    >> this is the case.
    >>
    >
    > Because I observed that the output of 'perf stat -e 0:0 -e 0:1 -e 0:6 <cmd>'
    > is always like below without the quirk.
    >
    >  Performance counter stats for '<cmd>':
    >
    >              0  cycles
    >              0  instructions
    >              0  bus-cycles
    >
    >> Perfmon is working on Atom and there, fixed counters work perfectly:
    >> $ head -6 /proc/cpuinfo
    >> processor     : 0
    >> vendor_id     : GenuineIntel
    >> cpu family    : 6
    >> model         : 28
    >> model name    : Intel(R) Atom(TM) CPU  230   @ 1.60GHz
    >> stepping      : 2
    >> ...
    >
    > My cpuinfo is below and the only difference I can see is 270 vs 230.
    >
    > processor       : 0
    > vendor_id       : GenuineIntel
    > cpu family      : 6
    > model           : 28
    > model name      : Intel(R) Atom(TM) CPU N270   @ 1.60GHz
    > stepping        : 2
    >
    Unfortunately, I don't have a N270 to compare with your results.
    We need to verify whether or not N270 implements the fixed counters.
    Does it report architected perfmon v3 or v1?

    > The return value of CPUID(0xa) is indeed bogus, too and there is another quirk for that in
    > intel_pmu_init() in arch/x86/kernel/cpu/perf_counter.c
    >
    > x86_pmu.num_counters_fixed      = max((int)edx.split.num_counters_fixed, 3);
    >
    > Is this what you were talking about?

    Not quite, because with the max() you'd have a problem on Intel Core
    Duo/Solo processors
    as they do implement the first generation of architected perfmon and
    that one did not have
    fixed counters. So you'd have to special case family=6 model=14.
    --
    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: 2009-06-23 09:53    [W:0.030 / U:30.540 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site