mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: perf: multiplexing broken on amd fam16h?
Date: Wed, 22 Jul 2015 00:10:43 +0200	[thread overview]
Message-ID: <20150721221043.GA19282@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.DEB.2.20.1507211408170.29103@vincent-weaver-1.umelst.maine.edu>

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

  parent reply	other threads:[~2015-07-21 22:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-21 18:14 Vince Weaver
2015-07-21 19:32 ` Peter Zijlstra
2015-07-21 20:08   ` Vince Weaver
2015-07-22 12:22     ` Peter Zijlstra
2015-07-22 14:57       ` Vince Weaver
2015-07-22 15:00         ` Peter Zijlstra
2015-07-22 15:02         ` Vince Weaver
2015-07-22 15:06           ` Peter Zijlstra
2015-07-22 15:41             ` Peter Zijlstra
2015-07-22 16:56               ` Vince Weaver
2015-07-22 19:07                 ` Peter Zijlstra
2015-07-22 19:59                   ` Vince Weaver
2015-07-22 20:10                     ` Peter Zijlstra
2015-07-21 22:10 ` Peter Zijlstra [this message]
2015-07-22 14:10 ` Peter Zijlstra
2015-07-22 14:36   ` Vince Weaver

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=20150721221043.GA19282@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=vincent.weaver@maine.edu \
    /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

Powered by JetHome