linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] perf core: Read from overwrite ring buffer
@ 2016-01-25  8:33 Wang Nan
  2016-01-25  8:33 ` [PATCH 1/5] perf core: Introduce new ioctl options to pause and resume " Wang Nan
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Wang Nan @ 2016-01-25  8:33 UTC (permalink / raw)
  To: peterz, alexei.starovoitov, acme
  Cc: linux-kernel, Wang Nan, He Kuang, Alexei Starovoitov,
	Arnaldo Carvalho de Melo, Brendan Gregg, Jiri Olsa,
	Masami Hiramatsu, Namhyung Kim, Zefan Li, pi3orama

This is the v3 of this series. Compare with v2, tailsize method is
removed, ioctl command PERF_EVENT_IOC_PAUSE_OUTPUT is changed to
_IOW('$', 9, __u32) since it has an input value, commit message
is slightly adjusted.

New test result on ARM64 is below (x86_64 result is copied from previous
email, test method is described in previous version [1]):

                       x86_64        |       ARM64
              -----------------------+---------------------
                MEAN         STDVAR  |    MEAN       STDVAR
   BASE     :  879870.81   11913.13  |  808302.67   6951.47
   RAWPERF  : 2603854.70  706658.40  | 3461675.12  54075.69
   WRTBKWRD : 2313301.22    6727.96  | 3350177.98  23125.48
   TAILSIZE : 2383051.86    5248.06  | 3556496.56  24802.17
   RAWOVWRT : 2315273.18    5221.03  | 3458767.49  41560.32
   RAWOVWRT*: 2323970.45    5103.39  | 3438967.06  34095.83

ARM64 platform is a smartphone with 8 Hisilicon arm64 cores
(big/little).

Benckmarking result on both architechure support removing tailsize
method because its performance penalty is higher than WRTBKWRD. Also, it
seems we don't need to consider tailheader method (putting whole header
at the end of records, kernel write to the ring buffer from beginning to
end), because the above result shows WRTBKWRD and RAWOVWRT are similar,
and tailheader is impossible to outperform RAWOVWRT in theory.

[1] http://lkml.kernel.org/g/1453464834-233200-1-git-send-email-wangnan0@huawei.com

Wang Nan (5):
  perf core: Introduce new ioctl options to pause and resume ring buffer
  perf core: Set event's default overflow_handler
  perf core: Prepare writing into ring buffer from end
  perf core: Add backward attribute to perf event
  perf core: Reduce perf event output overhead by new overflow handler

 include/linux/perf_event.h      | 22 +++++++++++--
 include/uapi/linux/perf_event.h |  4 ++-
 kernel/events/core.c            | 73 +++++++++++++++++++++++++++++++++++------
 kernel/events/internal.h        | 11 +++++++
 kernel/events/ring_buffer.c     | 63 +++++++++++++++++++++++++++++++----
 5 files changed, 153 insertions(+), 20 deletions(-)

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com

-- 
1.8.3.4

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH 0/5] perf core: Support overwrite ring buffer
@ 2016-03-14  9:59 Wang Nan
  2016-03-14  9:59 ` [PATCH 1/5] perf core: Introduce new ioctl options to pause and resume " Wang Nan
  0 siblings, 1 reply; 16+ messages in thread
From: Wang Nan @ 2016-03-14  9:59 UTC (permalink / raw)
  To: peterz, mingo
  Cc: linux-kernel, Wang Nan, He Kuang, Alexei Starovoitov,
	Arnaldo Carvalho de Melo, Brendan Gregg, Jiri Olsa,
	Masami Hiramatsu, Namhyung Kim, Zefan Li, pi3orama

Previous patch set at [1] has a problem when using hw_breakpoints on
ARM and ARM64. This new version fix that by introducing
is_default_overflow_handler() to replace all '!overflow_handler'
checking.

[1] http://lkml.kernel.org/g/1457322619-170254-1-git-send-email-wangnan0@huawei.com

Wang Nan (5):
  perf core: Introduce new ioctl options to pause and resume ring buffer
  perf core: Set event's default overflow_handler
  perf core: Prepare writing into ring buffer from end
  perf core: Add backward attribute to perf event
  perf core: Reduce perf event output overhead by new overflow handler

 arch/arm/kernel/hw_breakpoint.c   |  4 +--
 arch/arm64/kernel/hw_breakpoint.c |  4 +--
 include/linux/perf_event.h        | 32 +++++++++++++++--
 include/uapi/linux/perf_event.h   |  4 ++-
 kernel/events/core.c              | 73 +++++++++++++++++++++++++++++++++------
 kernel/events/internal.h          | 11 ++++++
 kernel/events/ring_buffer.c       | 63 +++++++++++++++++++++++++++++----
 7 files changed, 167 insertions(+), 24 deletions(-)

Cc: He Kuang <hekuang@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
-- 
1.8.3.4

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

end of thread, other threads:[~2016-10-21  8:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25  8:33 [PATCH 0/5] perf core: Read from overwrite ring buffer Wang Nan
2016-01-25  8:33 ` [PATCH 1/5] perf core: Introduce new ioctl options to pause and resume " Wang Nan
2016-01-25  8:33 ` [PATCH 2/5] perf core: Set event's default overflow_handler Wang Nan
2016-01-25  8:33 ` [PATCH 3/5] perf core: Prepare writing into ring buffer from end Wang Nan
2016-01-25  8:33 ` [PATCH 4/5] perf core: Add backward attribute to perf event Wang Nan
2016-01-25  8:33 ` [PATCH 5/5] perf core: Reduce perf event output overhead by new overflow handler Wang Nan
2016-01-26  0:24 ` [PATCH 0/5] perf core: Read from overwrite ring buffer Alexei Starovoitov
2016-01-26  8:26 ` Wangnan (F)
  -- strict thread matches above, loose matches on Subject: below --
2016-03-14  9:59 [PATCH 0/5] perf core: Support " Wang Nan
2016-03-14  9:59 ` [PATCH 1/5] perf core: Introduce new ioctl options to pause and resume " Wang Nan
2016-03-23  9:16   ` Peter Zijlstra
2016-03-23  9:33     ` Wangnan (F)
2016-03-23  9:52       ` Peter Zijlstra
2016-03-23 12:43       ` Vince Weaver
2016-10-21  7:06       ` Michael Kerrisk (man-pages)
2016-10-21  7:13         ` Wangnan (F)
2016-10-21  8:55           ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).