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: <c6331666-e4af-f1b5-99a5-abf0fdd54a63@linux.intel.com>
Date:   Mon, 8 Oct 2018 17:42:18 +0300
From:   Alexey Budankov <alexey.budankov@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.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 v11 2/3]: perf record: enable asynchronous trace writing

Hi,
On 08.10.2018 15:53, Jiri Olsa wrote:
> On Mon, Oct 08, 2018 at 03:24:31PM +0300, Alexey Budankov wrote:
>> Hi,
>>
>> On 08.10.2018 13:52, Jiri Olsa wrote:
>>> On Mon, Oct 08, 2018 at 09:17:11AM +0300, Alexey Budankov wrote:
>> <SNIP>
>>>> +#ifdef HAVE_AIO_SUPPORT
>>>> +	off = lseek(trace_fd, 0, SEEK_CUR);
>>>> +#endif
>>>
>>> I'm still little puzzled why we need to do this,
>>> when the aio write takes the offset value, but
>>
>> pwrite() syscall [1] which is the base for aio_write() doesn't 
>> advance file pos value so it requires to be calculated and 
>> updated by callers of aio_write() API.
> 
> ok, so aio_write does not need the offset to be updated,
> who needs it then?

aio_write() needs this offset as an input parameter.
aio_write() gets offset as a part of cblock object.
Adjacent aio_write() records should not overlap in the trace file so
off value is incremented by size in every loop iteration after 
successful aio_write() call.

Thanks,
Alexey

> 
> jirka
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ