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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <569DA586.6070302@huawei.com>
Date:	Tue, 19 Jan 2016 10:55:02 +0800
From:	"Wangnan (F)" <wangnan0@...wei.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	<acme@...nel.org>, <linux-kernel@...r.kernel.org>,
	<pi3orama@....com>, <lizefan@...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>,
	"David S. Miller" <davem@...emloft.net>,
	"Jiri Olsa" <jolsa@...nel.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH] perf core: Introduce new ioctl options to pause and resume
 ring buffer



On 2016/1/18 20:02, Peter Zijlstra wrote:
> On Mon, Jan 18, 2016 at 11:52:01AM +0000, Wang Nan wrote:
>
>> +#define PERF_EVENT_IOC_PAUSE_OUTPUT	_IO ('$', 9)
>> +#define PERF_EVENT_IOC_RESUME_OUTPUT	_IO ('$', 10)
> Would not a single IOCTL with a 'boolean' parameter make more sense?

Good suggestion.

>> +++ b/kernel/events/ring_buffer.c
>> @@ -125,7 +125,7 @@ int perf_output_begin(struct perf_output_handle *handle,
>>   	if (unlikely(!rb))
>>   		goto out;
>>   
>> -	if (unlikely(!rb->nr_pages))
>> +	if (unlikely(rb->paused))
>>   		goto out;
> Should we increment rb->lost in this case?

Not sure about this. The ring buffer is paused deliberately, shall we 
consider the
events we miss as losted events? However I'll try it in next version.

Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ