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: <af8cc53e-b6c3-9a28-6f66-45817b65badc@linux.intel.com>
Date:   Thu, 6 Sep 2018 14:57:16 +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
> 
>> -static int record__pushfn(void *to, void *bf, size_t size)
>> +static int record__pushfn(void *to, struct aiocb *cblock, void *data, size_t size)
>>  {
>> +	off_t off;
>>  	struct record *rec = to;
>> +	int ret, trace_fd = rec->session->data->file.fd;
>>  
>>  	rec->samples++;
>> -	return record__write(rec, bf, size);
>> +
>> +	off =
>> +	lseek(trace_fd, 0, SEEK_CUR);
>> +	lseek(trace_fd, off + size, SEEK_SET);
>> +
>> +	ret = record__aio_write(cblock, trace_fd, data, size, off);
>> +	if (!ret) {
>> +		rec->bytes_written += size;
>> +		if (switch_output_size(rec))
>> +			trigger_hit(&switch_output_trigger);
> 
> why do you need to call switch output from here?

Just preserved this logic from the serial implementation.

> 
> jirka
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ