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]
Message-ID: <20180212094357.GD5821@krava>
Date:   Mon, 12 Feb 2018 10:43:57 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Raghavendra Rao Ananta <rananta@...eaurora.org>
Cc:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        alexander.shishkin@...ux.intel.com, namhyung@...nel.org,
        linux-kernel@...r.kernel.org, psodagud@...eaurora.org,
        tsoni@...eaurora.org
Subject: Re: [PATCH] perf: Add support for creating offline events

On Fri, Feb 09, 2018 at 03:07:00PM -0800, Raghavendra Rao Ananta wrote:
> Perf framework doesn't allow creation of hardware events if
> the requested CPU is offline. However, creation of an event
> is achievable if the event is attached to the PMU as soon
> as the CPU is online again.
> 
> So, introducing a feature that could allow to create events
> even when the CPU is offline and return a success to the caller.
> If, during the time of event creation, the CPU is found offline,
> the event is moved to a new state (PERF_EVENT_STATE_DORMANT). As
> and when the CPU is know to be woken up (through hotplug notifiers),
> all the dormant events would be attached to the PMU (by
> perf_install_in_context()). If during the life time of the event,
> the CPU hasn't come online, the dormant event would just be freed.
> 
> Signed-off-by: Raghavendra Rao Ananta <rananta@...eaurora.org>

hum, I tried and for some reason I'm getting zero counts/times
when the cpu 1 is set back online (in 9.second)

[root@...-x3650m4-02 perf]# ./perf stat -C 1 -e sched:sched_switch -v -I 1000
failed to read counter sched:sched_switch
#           time             counts unit events
     1.000921624      <not counted>      sched:sched_switch                                          
failed to read counter sched:sched_switch
     2.001725364      <not counted>      sched:sched_switch                                          
failed to read counter sched:sched_switch
     3.002685350      <not counted>      sched:sched_switch                                          
failed to read counter sched:sched_switch
     4.003463851      <not counted>      sched:sched_switch                                          
failed to read counter sched:sched_switch
     5.004651601      <not counted>      sched:sched_switch                                          
failed to read counter sched:sched_switch
     6.005338294      <not counted>      sched:sched_switch                                          
failed to read counter sched:sched_switch
     7.006351155      <not counted>      sched:sched_switch                                          
failed to read counter sched:sched_switch
     8.007239698      <not counted>      sched:sched_switch                                          
sched:sched_switch: 0 0 0
     9.008665621      <not counted>      sched:sched_switch                                          
sched:sched_switch: 0 0 0
    10.009570492      <not counted>      sched:sched_switch                                          
sched:sched_switch: 0 0 0
    11.010811591      <not counted>      sched:sched_switch                                          
sched:sched_switch: 0 0 0
    12.011614182      <not counted>      sched:sched_switch                                          
sched:sched_switch: 0 0 0
    13.012299851      <not counted>      sched:sched_switch                                          

looks like the dormant event wasn't scheduled in properly

also while at it, could we also handle cpu going offline case,
so the event would survive until it's back online

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ