mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@sig21.net>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"Thomas Gleixner" <tglx@linutronix.de>
Subject: Re: [patch] cache-miss and cache-refs events on P6-mobile CPUs
Date: Tue, 11 Aug 2009 17:50:52 +0200	[thread overview]
Message-ID: <20090811155052.GB5315@sig21.net> (raw)
In-Reply-To: <20090811093405.GA13004@elte.hu>

On Tue, Aug 11, 2009 at 11:34:05AM +0200, Ingo Molnar wrote:
> 
> Could you try the patch below, does it do the trick? Note, since 
> there's just two generic counters and perf stat uses four counters, 
> you'll need to run longer commands than 'true' or something like:
> 
>   perf stat -a sleep 1
> 
> or:
> 
>   perf stat --repeat 10 /bin/ls -R /usr/bin >/dev/null
> 
> to get all counters excercised and time-shared on your CPU.

OK, here are the results:

# ./perf stat -a true

 Performance counter stats for 'true':

       1.332145  task-clock-msecs         #      1.057 CPUs 
              4  context-switches         #      0.003 M/sec
              0  CPU-migrations           #      0.000 M/sec
            121  page-faults              #      0.091 M/sec
         788333  cycles                   #    591.777 M/sec
         610408  instructions             #      0.774 IPC  
  <not counted>  cache-references        
  <not counted>  cache-misses            

    0.001260775  seconds time elapsed

# ./perf stat -a sleep 1

 Performance counter stats for 'sleep 1':

    1001.358010  task-clock-msecs         #      1.000 CPUs 
            253  context-switches         #      0.000 M/sec
              0  CPU-migrations           #      0.000 M/sec
            145  page-faults              #      0.000 M/sec
        8841883  cycles                   #      8.830 M/sec  (scaled from 85.04%)
        6361047  instructions             #      0.719 IPC    (scaled from 78.03%)
         801847  cache-references         #      0.801 M/sec  (scaled from 14.96%)
          16925  cache-misses             #      0.017 M/sec  (scaled from 21.97%)

    1.001540692  seconds time elapsed

# ./perf stat --repeat 10 /bin/ls -R /usr/bin >/dev/null

 Performance counter stats for '/bin/ls -R /usr/bin' (10 runs):

       8.642859  task-clock-msecs         #      0.939 CPUs    ( +-   2.382% )
              1  context-switches         #      0.000 M/sec   ( +-   0.000% )
              0  CPU-migrations           #      0.000 M/sec   ( +-   0.000% )
            375  page-faults              #      0.043 M/sec   ( +-   0.000% )
       14796621  cycles                   #   1712.005 M/sec   ( +-   0.306% )
       15526008  instructions             #      1.049 IPC     ( +-   0.020% )
  <not counted>  cache-references        
  <not counted>  cache-misses            

    0.009207932  seconds time elapsed   ( +-   4.020% )

# ./perf stat --repeat 10 /bin/ls -lR /usr/bin >/dev/null

 Performance counter stats for '/bin/ls -lR /usr/bin' (10 runs):

      49.894190  task-clock-msecs         #      0.762 CPUs    ( +-   8.231% )
             45  context-switches         #      0.001 M/sec   ( +-  52.174% )
              0  CPU-migrations           #      0.000 M/sec   ( +-   0.000% )
            476  page-faults              #      0.010 M/sec   ( +-   0.000% )
       81036819  cycles                   #   1624.173 M/sec   ( +-   3.166% )  (scaled from 96.03%)
       88822455  instructions             #      1.096 IPC     ( +-   2.108% )  (scaled from 96.42%)
         573228  cache-references         #     11.489 M/sec   ( +-  37.947% )
  <not counted>  cache-misses            

    0.065464625  seconds time elapsed   ( +-  19.349% )

# ./perf stat --repeat 10 /bin/ls -R /usr/lib >/dev/null

 Performance counter stats for '/bin/ls -R /usr/lib' (10 runs):

     136.771643  task-clock-msecs         #      0.075 CPUs    ( +-  19.292% )
            757  context-switches         #      0.006 M/sec   ( +-  56.332% )
              0  CPU-migrations           #      0.000 M/sec   ( +-   0.000% )
            343  page-faults              #      0.003 M/sec   ( +-   0.000% )
      173125500  cycles                   #   1265.800 M/sec   ( +-   5.034% )  (scaled from 78.21%)
      174597635  instructions             #      1.009 IPC     ( +-   1.829% )  (scaled from 78.34%)
        2441413  cache-references         #     17.850 M/sec   ( +-  18.289% )  (scaled from 21.79%)
          21112  cache-misses             #      0.154 M/sec   ( +-  11.183% )  (scaled from 21.66%)

    1.824204481  seconds time elapsed   ( +-  29.781% )


Johannes

  parent reply	other threads:[~2009-08-11 15:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07 17:09 2.6.31-rc5 regression: x86 MCE malfunction on Thinkpad T42p Johannes Stezenbach
2009-08-09 10:03 ` Johannes Stezenbach
2009-08-09 10:34   ` Bartlomiej Zolnierkiewicz
2009-08-09 16:47     ` Johannes Stezenbach
2009-08-10 10:31 ` Andi Kleen
2009-08-10 12:27   ` Johannes Stezenbach
2009-08-10 12:32     ` Andi Kleen
2009-08-10 12:56       ` Johannes Stezenbach
2009-08-10 13:29         ` Ingo Molnar
2009-08-10 19:26           ` Johannes Stezenbach
2009-08-10 19:44             ` Andi Kleen
2009-08-10 20:05               ` Robert Richter
2009-08-10 20:14             ` Ingo Molnar
2009-08-10 20:37               ` Johannes Stezenbach
2009-08-10 21:31                 ` Ingo Molnar
2009-08-10 22:13                   ` Johannes Stezenbach
2009-08-11  9:34                     ` [patch] cache-miss and cache-refs events on P6-mobile CPUs Ingo Molnar
2009-08-11  9:39                       ` Peter Zijlstra
2009-08-11 11:06                         ` Ingo Molnar
2009-08-11 11:21                           ` Peter Zijlstra
2009-08-11 15:50                       ` Johannes Stezenbach [this message]
2009-08-11 16:56                         ` Ingo Molnar
2009-08-11 15:40                     ` 2.6.31-rc5 regression: x86 MCE malfunction on Thinkpad T42p Johannes Stezenbach
2009-08-17 14:49                       ` Steven Rostedt
2009-08-12 11:59   ` *PING* [PATCH]: x86: mce: fix mce warning with disabled lapic Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090811155052.GB5315@sig21.net \
    --to=js@sig21.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®