[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <A9CFD1D0-AD05-44C0-86E0-880B77FD1216@163.com>
Date: Tue, 19 Jan 2016 22:14:06 +0800
From: pi3orama <pi3orama@....com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>, peterz@...radead.org,
ast@...nel.org, linux-kernel@...r.kernel.org,
He Kuang <hekuang@...wei.com>,
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>,
Zefan Li <lizefan@...wei.com>
Subject: Re: [PATCH 0/6] perf core: Read from overwrite ring buffer
发自我的 iPhone
> 在 2016年1月19日,下午9:58,Namhyung Kim <namhyung@...nel.org> 写道:
>
> Hi,
>
>> On Tue, Jan 19, 2016 at 11:16:44AM +0000, Wang Nan wrote:
>> This patchset introduces two methods to support reading from overwrite.
>>
>> 1) Tailsize: write the size of an event at the end of it
>> 2) Backward writing: write the ring buffer from the end of it to the
>> beginning.
>
> So both of two methods should be used together?
>
They are separated, we should use only one
of them. I prefer backward writing. But if we
select them both they should work.
Both of them have drawback. Tailsize
method adds 8 bytes to each record
(needs more cycles to write and consume
more space), backward writing may causes
more cache misses since processor doesn't
support backward cache prefetching. Tomorrow I will compare their performance penalty to see which one is better.
Thank you.
> Thanks,
> Namhyung
>
>
>>
>> Patch 1/6 introduces a new ioctl operation to pause and resume ring
>> buffer since reading from a overwrite ring buffer is not reliable.
>>
>> To reduce overhead as much as possible, force setting overflow_handler
>> and create specific function for backward writing and onward writing.
>>
>> 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
>>
>> 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 backwork 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 | 65 ++++++++++++++---
>> 5 files changed, 223 insertions(+), 54 deletions(-)
>>
>> --
>> 1.8.3.4
>>
Powered by blists - more mailing lists