lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Aug 2009 18:56:14 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Johannes Stezenbach <js@...21.net>
Cc:	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Steven Rostedt <rostedt@...dmis.org>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [patch] cache-miss and cache-refs events on P6-mobile CPUs


* Johannes Stezenbach <js@...21.net> wrote:

> 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% )

Ok, this all looks pretty good!

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ