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] [day] [month] [year] [list]
Message-ID: <CABPqkBSA8-kvMtiPfWZ6bJCqL9TSJP=d3mLxd4MNOQyd1Kd-rg@mail.gmail.com>
Date:   Fri, 20 Apr 2018 18:19:13 +0000
From:   Stephane Eranian <eranian@...gle.com>
To:     Vince Weaver <vincent.weaver@...ne.edu>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Jiri Olsa <jolsa@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>, mingo@...e.hu,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [RFC] perf/core: what is exclude_idle supposed to do

On Fri, Apr 20, 2018 at 9:51 AM Vince Weaver <vincent.weaver@...ne.edu>
wrote:

> On Fri, 20 Apr 2018, Vince Weaver wrote:

> > > AFAICT it works on Power and possibly ARM.
> >
> > at least some ARMs are a bit more honest about it than x86
> >
> > ivybridge:
> >       Performance counter stats for '/bin/ls':
> >       1,368,162      instructions
> >       1,368,162      instructions:I
> >
> > pi2/ARM cortex-A7
> >       Performance counter stats for '/bin/ls':
> >       1,910,083      instructions
> >       <not supported>      instructions:I
> >
> > I'd fire up my Power8 machine to see but not sure it's worth the hassle
> > and/or having to get out the ear protection.

> I did power up the Power8 machine in the end:

> power8:
>          perf stat -e cycles,cycles:I sleep 5
>          Performance counter stats for 'sleep 5':
>          14,271,273      cycles
>          14,271,273      cycles:I

> ???

> But then if I try again on power8

>          perf stat -a -e cycles,cycles:I sleep 5
>           Performance counter stats for 'system wide':
>          1,238,772,322,327      cycles
>          1,238,674,771,713      cycles:I

> there is a difference.

> But then on ivybridge

>          perf stat -a -e cycles,cycles:I sleep 5
>          Performance counter stats for 'system wide':
>          589,598,104      cycles
>          589,537,190      cycles:I

This may be noise.

The way the flag is named leads me to believe its goal is to not count when
executing in the context of the idle task (pid 0 on each CPU).
However, it does not seem to be implemented that way. If you were to
implement this, then in system wide mode you'd have to check
the incoming task on ctxsw, very much like we do in cgroup monitoring. So
it would not be totally free. One can argue, in sampling mode
you can eliminate the samples coming from PID=0 in the tool. But there
would be nothing to cover counting mode.

Interestingly, there is also code in perf tool to exclude known idle
routines from reporting. But this is targeted to only some routines that the
idle task may end up executing. so it is not quite the same.


> So maybe exclude_idle does do something on x86?  Or am I completely
> misunderstanding what the flag is supposed to be indicating?

> Vince

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ