[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160118120230.GP6357@twins.programming.kicks-ass.net>
Date: Mon, 18 Jan 2016 13:02:30 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Wang Nan <wangnan0@...wei.com>
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 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?
> +++ 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?
Powered by blists - more mailing lists