[lttng-dev] Changed scheduling when using lttng

Mats Liljegren liljegren.mats2 at gmail.com
Thu May 2 03:40:17 EDT 2013


>>       --buffers-global     Use shared buffer for the whole system (-k only)
>
> This option would be clearer as "--buffers-per-cpu" maybe ?

This makes me even more confused... The name "buffers-global" is very
clear to me. Opposites would be buffers private for a CPU, for a UID,
and so on. Is the option "--buffers-global" meant to be an opposite of
"--buffers-uid" and "--buffers-pid"? This would seems strange since
those two are only for user space tracing while "--buffers-global" is
for kernel tracing. By the way, isn't "--buffers-per-cpu" default? Oh
well...

But the real confusion lies in the fact that I cannot see the option
being used for anything. It sets the file local variable
opt_buffers_global, and is used for a sanity check. But I can't see it
being used for anything else. Have I missed something here?

>
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>   -C, --tracefile-size SIZE
>>                            Maximum size of of each tracefile within a
>> stream (in bytes).
>>   -W, --tracefile-count COUNT
>>                            Used in conjunction with -C option, this
>> will limit the number
>>                            of files created to the specified count.
>>
>> I look in src/bin/lttng/commands/enable_channels.c, the long option
>> array will point to opt_buffer_global. The only use for this file
>> private variable is for a single sanity check. I cannot see any other
>> use of it. Have I missed something here?
>>
>> But in this file, function enable_channel(), I see:
>>
>>                 dom.buf_type = LTTNG_BUFFER_GLOBAL;
>>
>> This is executed for the kernel case. But my buffers are still
>> allocated per-cpu. What is going on? Where did this configuration go?
>> What does it do?
>>
>> If I take this from the other end, I'd like to use the line:
>>     .alloc = RING_BUFFER_ALLOC_GLOBAL
>> found in
>>     lttng-ring-buffer-metadata-client.h
>> How do I make this happen?
>
> lttng-sessiond never creates buffers shared between CPUs for now (except
> for metadata). The "--buffers-global" option is misleading and should
> possibly be renamed.

So it is lttng-sessiond that dictates the allocation type? I'll take a
closer look at it.

/Mats



More information about the lttng-dev mailing list