lkml.org 
[lkml]   [2021]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [V2] perf/core: Avoid calling perf_mux_hrtimer_restart multiple times when scheduling event groups
On Sat, Oct 16, 2021 at 01:08:04AM +0000, Song Liu wrote:
>
>
> > On Oct 15, 2021, at 12:04 AM, Athira Rajeev <atrajeev@linux.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@linux.vnet.ibm.com>
>
> Acked-by: Song Liu <song@kernel.org>

Thanks!

\
 
 \ /
  Last update: 2021-10-18 13:09    [W:0.057 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site