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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Jul 2015 00:10:43 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Vince Weaver <vincent.weaver@...ne.edu>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: Re: perf: multiplexing broken on amd fam16h?

On Tue, Jul 21, 2015 at 02:14:54PM -0400, Vince Weaver wrote:
> I tried to replicate the problem using perf, but for some reason I can't 
> get perf to multiplex on any of my machines.  That used to transparently 
> work didn't it?
> 
> here's the result on the haswell machine
> 
> perf stat -e cycles,instructions,cycles,instructions,cycles,instructions,cycles,instructions 
> sleep 5
> 
>  Performance counter stats for 'sleep 5':
> 
>          1,354,527      cycles                   
>          1,934,694      instructions              #    1.76  insns per cycle        
>          1,521,148      cycles                   
>          1,934,694      instructions              #    1.76  insns per cycle        
>          1,521,148      cycles                   
>          1,223,321      instructions              #    1.11  insns per cycle         [13.61%]
>      <not counted>      cycles                   
>      <not counted>      instructions             
> 
>        5.003651781 seconds time elapsed

This is because sleep 5 is idle, and an task that's scheduled-out
doesn't have a rotation timer programmed.

If you use cpu-wide events, or a busy task it works:

# perf stat -ae cycles,instructions,cycles,instructions,cycles,instructions,cycles,instructions -- sleep 5

 Performance counter stats for 'system wide':

    15,460,117,724      cycles                                                        (62.79%)
     4,276,675,617      instructions              #    0.28  insns per cycle          (62.77%)
    15,475,455,605      cycles                                                        (62.75%)
     4,284,683,187      instructions              #    0.28  insns per cycle          (62.74%)
    15,483,305,807      cycles                                                        (62.74%)
     4,286,820,811      instructions              #    0.28  insns per cycle          (62.63%)
    15,410,655,866      cycles                                                        (62.59%)
     4,257,624,307      instructions              #    0.28  insns per cycle          (62.60%)

       5.002916366 seconds time elapsed


# perf stat -e cycles,instructions,cycles,instructions,cycles,instructions,cycles,instructions -- ./spin5.sh

 Performance counter stats for './spin5.sh':

    16,195,427,921      cycles                                                        (62.45%)
    35,544,317,856      instructions              #    2.20  insns per cycle          (62.43%)
    16,181,167,756      cycles                                                        (62.49%)
    35,484,446,997      instructions              #    2.19  insns per cycle          (62.54%)
    16,167,563,501      cycles                                                        (62.58%)
    35,486,346,040      instructions              #    2.19  insns per cycle          (62.57%)
    16,177,845,357      cycles                                                        (62.56%)
    35,532,260,091      instructions              #    2.20  insns per cycle          (62.48%)

       5.009328353 seconds time elapsed
--
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