mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] patches to reduce perf overhead
@ 2017-01-18 13:21 kan.liang
  2017-01-18 13:21 ` [PATCH 1/2] perf,core: try parent pmu first when init child event kan.liang
  2017-01-18 13:21 ` [PATCH 2/2] perf,core: use parent avg sample period as child initial period kan.liang
  0 siblings, 2 replies; 6+ messages in thread
From: kan.liang @ 2017-01-18 13:21 UTC (permalink / raw)
  To: linux-kernel, peterz, mingo; +Cc: alexander.shishkin, eranian, ak, Kan Liang

From: Kan Liang <kan.liang@intel.com>

perf brings additional overhead when monitoring the task which
frequently generates child task. Two of the related issues are fixed
in the patch series.

Here is some data from the overhead test on Broadwell server
  perf record -e $TEST_EVENTS -- ./loop.sh 50000

loop.sh
  start=$(date +%s%N)
  i=0
  while [ "$i" -le "$1" ]
  do
          date > /dev/null
          i=`expr $i + 1`
  done
  end=$(date +%s%N)
  elapsed=`expr $end - $start`

Event#	Original elapsed time	Elapsed time with two patches	delta
1	196,573,192,397		187,781,884,240			-4.47%
2	257,567,753,013		238,954,990,569			-7.23%
4	398,730,726,971		354,101,552,792			-11.19%
8	824,983,761,120		673,623,574,792			-18.35%
16	1,883,411,923,498	1,456,452,391,357		-22.67%

Kan Liang (2):
  perf,core: try parent pmu first when init child event
  perf,core: use parent avg sample period as child initial period

 include/linux/perf_event.h |  3 +++
 kernel/events/core.c       | 28 ++++++++++++++++++++++++++--
 2 files changed, 29 insertions(+), 2 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-30 12:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 13:21 [PATCH 0/2] patches to reduce perf overhead kan.liang
2017-01-18 13:21 ` [PATCH 1/2] perf,core: try parent pmu first when init child event kan.liang
2017-01-30 11:59   ` [tip:perf/core] perf/core: Try parent PMU first when initializing a " tip-bot for Kan Liang
2017-01-18 13:21 ` [PATCH 2/2] perf,core: use parent avg sample period as child initial period kan.liang
2017-01-25 15:33   ` Peter Zijlstra
2017-01-29 15:24     ` Liang, Kan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome