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] [day] [month] [year] [list]
Message-ID: <61b828af-dd68-a45a-2a90-af8b29cc4c94@linux.intel.com>
Date:   Thu, 6 Sep 2018 15:09:19 +0300
From:   Alexey Budankov <alexey.budankov@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 2/2]: perf record: enable asynchronous trace writing



On 06.09.2018 14:04, Jiri Olsa wrote:
> On Wed, Sep 05, 2018 at 10:39:25AM +0300, Alexey Budankov wrote:
> 
> SNIP
> 
>> +		} else if (errno != EAGAIN) {
>> +			cblock->aio_fildes = -1;
>> +			pr_err("failed to queue perf data, error: %m\n");
>> +			break;
>> +		}
>> +	} while (1);
>> +
>> +	return rc;
>> +}
>> +
>> +static int record__aio_sync(struct perf_mmap *md)
>> +{
> 
> this is almost identical to record__aio_sync function,
> it looks like we should be able to do the sync with
> single function.. for both the in-between syncs and
> the final one

There is some code duplication here. for()'s loop body at 
record__aio_complete() could probably be separated to 
a function and then reused by record__aio_sync().
The rest is not obvious at the moment.

> 
> jirka
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ