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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1453464834-233200-1-git-send-email-wangnan0@huawei.com>
Date:	Fri, 22 Jan 2016 12:13:48 +0000
From:	Wang Nan <wangnan0@...wei.com>
To:	<peterz@...radead.org>, <alexei.starovoitov@...il.com>,
	<acme@...nel.org>
CC:	<linux-kernel@...r.kernel.org>, Wang Nan <wangnan0@...wei.com>,
	He Kuang <hekuang@...wei.com>,
	Alexei Starovoitov <ast@...nel.org>,
	"Arnaldo Carvalho de Melo" <acme@...hat.com>,
	Brendan Gregg <brendan.d.gregg@...il.com>,
	"Jiri Olsa" <jolsa@...nel.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Zefan Li <lizefan@...wei.com>, <pi3orama@....com>
Subject: [PATCH 0/6] perf core: Read from overwrite ring buffer

This is v2 of this series.

Compare with v1:

Fixes several bugs in v1.

Corresponsing perf has finished and can be found from:

 https://git.kernel.org/cgit/linux/kernel/git/pi3orama/linux.git/ 
 branch: perf/overwrite-benchmark

Some benchmarking results can be found from [1].

Summary:

On a PC with Intel E5-2640 0 @ 2.50GHz CPU, execute close(-1) 3000000
times, capture raw_syscalls:* with perf into overwrite ring buffer,
check total time (in us):

             MEAN           STDVAR
BASE     :  879870.81      11913.13
RAWPERF  : 2603854.7      706658.4
WRTBKWRD : 2313301.220      6727.957
TAILSIZE : 2383051.860      5248.061
RAWOVWRT : 2315273.180      5221.025
RAWOVWRT*: 2323970.45       5103.39 

Where:
BASE: don't use perf at all.
RAWPERF: use non-overwrite ring buffer, perf collects all data,
	 write to /dev/null
WRTBKWRD: Use backward writing ring buffer, write from tail to head,
          never wakeup perf, collect data when exiting.
TAILSIZE: Use tailsize ring buffer, pad 8 bytes for the size of the
          record for each event, never wakeup perf, collect data when
	  exiting.
RAWOVWRT: Use raw overwrite ring buffer, never wakeup perf, don't
          collect data at all.
RAWOVWRT*: Same as RAWOVWRT, without this patchset.

The benchmarking results shows WRTBKWRD is good enough. I suggest not
to implement TAILSIZE and tail-header ring buffer.

I will post the result on a smartphone next week.

[1] http://lkml.kernel.org/g/56A07FF3.2090009@huawei.com

Wang Nan (6):
  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 setting overwrite
    handler
  perf core: Put size of a sample at the end of it by
    PERF_SAMPLE_TAILSIZE

 include/linux/perf_event.h      |  39 +++++++---
 include/uapi/linux/perf_event.h |   7 +-
 kernel/events/core.c            | 155 +++++++++++++++++++++++++++++++---------
 kernel/events/internal.h        |  11 +++
 kernel/events/ring_buffer.c     |  70 +++++++++++++++---
 5 files changed, 228 insertions(+), 54 deletions(-)

Signed-off-by: Wang Nan <wangnan0@...wei.com>
Cc: He Kuang <hekuang@...wei.com>
Cc: Alexei Starovoitov <ast@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Brendan Gregg <brendan.d.gregg@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Zefan Li <lizefan@...wei.com>
Cc: pi3orama@....com
-- 
1.8.3.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ