lkml.org 
[lkml]   [2018]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9 2/3]: perf record: enable asynchronous trace writing
From
Date
Hi,

On 05.10.2018 13:55, Namhyung Kim wrote:
<SNIP>
> On Fri, Oct 05, 2018 at 12:39:10PM +0300, Alexey Budankov wrote:
<SNIP>
>>
>> It still have to adjust the file pos thru lseek() prior leaving
>> record__aio_pushfn() so space in trace file would be pre-allocated for
>> enqueued record and file pos be moved beyond the record data,
>> possibly for the next record.
>
> For that purpose, isn't it better calling ftruncate() with a
> reasonable batch size to reduce number of syscalls?
>

According to docs [1] ftruncate() does not advance file pos
which is essential here.

>
<SNIP>
>> Well, if it has AIO symbols + opts.nr_cblocks exposed unconditionally of
>> HAVE_AIO_SUPPORT, but keeps the symbols implementation under the define, then
>> as far aio-cblocks option is not exposed thru command line, we end up in
>> whole bunch of symbols referenced under the else branch that, after all,
>> can cause Perf binary size increase, which is, probably, worth avoiding.
>
> I think it's ok as long as they're empty.

Well, the both designs are possible and acceptable.
The only thing that matters here is contradictive requests from other reviewing folks.
Let me share the version without dummy functions so
we could jointly decide how to proceed from there.
Ok?

Thanks,
Alexey

[1] http://man7.org/linux/man-pages/man2/ftruncate.2.html

\
 
 \ /
  Last update: 2018-10-05 13:50    [W:0.179 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site