lkml.org 
[lkml]   [2018]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v11 3/3]: perf record: extend trace writing to multi AIO
On Mon, Oct 08, 2018 at 09:19:17AM +0300, Alexey Budankov wrote:

SNIP

> #ifdef HAVE_AIO_SUPPORT
> } else {
> + int idx;
> /*
> * Call record__aio_sync() to wait till map->data buffer
> * becomes available after previous aio write request.
> */
> - record__aio_sync(map);
> - if (perf_mmap__aio_push(map, rec, record__aio_pushfn, &off) != 0) {
> + idx = record__aio_sync(map, false);
> + if (perf_mmap__aio_push(map, rec, idx, record__aio_pushfn, &off) != 0) {
> lseek(trace_fd, off, SEEK_SET);
> rc = -1;
> goto out;
> @@ -1446,6 +1469,10 @@ static int perf_record_config(const char *var, const char *value, void *cb)
> var = "call-graph.record-mode";
> return perf_default_config(var, value, cb);
> }
> +#ifdef HAVE_AIO_SUPPORT
> + if (!strcmp(var, "record.aio-cblocks"))
> + rec->opts.nr_cblocks = strtol(value, NULL, 0);
> +#endif
>
> return 0;
> }
> @@ -1837,6 +1864,10 @@ static struct option __record_options[] = {
> "signal"),
> OPT_BOOLEAN(0, "dry-run", &dry_run,
> "Parse options then exit"),
> +#ifdef HAVE_AIO_SUPPORT
> + OPT_INTEGER(0, "aio-cblocks", &record.opts.nr_cblocks,
> + "Max number of simultaneous per-mmap trace writes (default: 0 - serial, max: 4)"),
> +#endif

could you please move the option to enable that to the previou patch?
so we could test the simple variant as well

also I think it'd be better if we have simple '--aio' option that would
enable this with some default values.. and add --aio-cblocks to configure
that further

thanks,
jirka

\
 
 \ /
  Last update: 2018-10-08 12:55    [W:0.165 / U:1.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site