> --- > Subject: perf/core: don't find side-band event from all pmus > From: Kan Liang <kan.li...@intel.com> > Date: Wed, 23 Mar 2016 11:24:37 -0700 > Hi Peter,
Is there something wrong with the patch? The last time I saw this patch was in your personal tree (kernel/git/peterz/queue.git). But now I cannot find it anymore. Thanks, Kan > perf_event_aux funciton goes through all pmus and all events in whatever > contexts to find the side-band event to output, which is unnecessary and > expensive. > > For example, the brk test case in lkp triggers many mmap operations, at the > time, perf with cycles:pp is also running on the system. As a result, many > perf_event_aux are invoked, and each would search all pmus and all events. > If we enable the uncore support (even when uncore event are not really > used), dozens of uncore pmus will be added into pmus list, which can > significantly decrease brk_test's ops_per_sec. Based on our test, the > ops_per_sec without uncore patch is 2647573, while the ops_per_sec with > uncore patch is only 1768444, which is a 33.2% reduction. > > To get at the per cpu side-band event, this patch put the side-band events to > four categories, which are tracked by 4 per-cpu lists. It only finds the > interested events from masked category. > To get at the per task side-band event, each task context for current task > will > be searched. Because we don't want to go update more global state on > context switch. > > > Cc: vincent.wea...@maine.edu > Cc: mi...@kernel.org > Cc: a...@redhat.com > Cc: a...@linux.intel.com > Cc: jo...@redhat.com > Cc: t...@linutronix.de > Cc: eran...@google.com > Cc: alexander.shish...@linux.intel.com > Reported-by: Huang, Ying <ying.hu...@linux.intel.com> > Suggested-by: Peter Zijlstra (Intel) <pet...@infradead.org> > Signed-off-by: Kan Liang <kan.li...@intel.com> > Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> > Link: http://lkml.kernel.org/r/1458757477-3781-1-git-send-email- > kan.li...@intel.com