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]
Message-ID: <6E561141-B584-4DB8-A33E-BCD3FF572FA4@fb.com>
Date:   Sat, 16 Oct 2021 01:08:04 +0000
From:   Song Liu <songliubraving@...com>
To:     Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
CC:     Peter Zijlstra <peterz@...radead.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "maddy@...ux.vnet.ibm.com" <maddy@...ux.vnet.ibm.com>,
        "kjain@...ux.ibm.com" <kjain@...ux.ibm.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "eranian@...gle.com" <eranian@...gle.com>
Subject: Re: [V2] perf/core: Avoid calling perf_mux_hrtimer_restart multiple
 times when scheduling event groups



> On Oct 15, 2021, at 12:04 AM, Athira Rajeev <atrajeev@...ux.vnet.ibm.com> wrote:
> 
> Perf uses multiplexing if there are more events to be scheduled than the
> available counters. With multiplexing, event groups will be rotated at
> specified interval of time which is set using "hrtimer". During event
> scheduling, if any of the event group fails to schedule, multiplexing
> gets enabled by setting "rotate_necessary" for that event context and
> starting the hrtimer by calling "perf_mux_hrtimer_restart".
> 
> Patch adds an optimisation to avoid calling "perf_mux_hrtimer_restart"
> multiple times if already rotate_necessary is set for that context.
> Even though "perf_mux_hrtimer_restart" will just return if hrtimer is
> already active, this could avoid the overhead of calling this function
> multiple times if there are many event groups. Patch adds the check to
> avoid calling perf_mux_hrtimer_restart() for each event group on
> every schedule.
> 
> Signed-off-by: Athira Rajeev <atrajeev@...ux.vnet.ibm.com>

Acked-by: Song Liu <song@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ