lkml.org 
[lkml]   [2017]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info
From
Date
Hi Eric,


On Thursday 16 February 2017 04:55 PM, Eric W. Biederman wrote:
>> +/*
>> + * The maximum size of the name of each namespace
>> + */
>> +#define NS_NAME_SIZE 8
>> +
>> +struct perf_ns_link_info {
>> + char name[NS_NAME_SIZE];
>> + __u64 dev;
>> + __u64 ino;
>> +};
> Ugh. I missed the name the first time around.
>
> That really looks like useless clutter. You already know the index so
> the name doesn't add any information, so unless I am missing something
> that name will just slow down the perf kernel implementation with
> useless work.
>
> The userspace reader can have the information just as reliably by
> looking at the index and indexing into a table.
>
> The set of namespaces changes slowly enough that this is not likely to
> be a problem in practice. Especially as perf is released with the
> kernel.
>
> Plus who knows how long the name of the next namespace is going to be.
>

Agreed. Will drop name field from the structure and use an indexing
table to get names in userspace..

Thanks
Hari

\
 
 \ /
  Last update: 2017-02-20 07:25    [W:1.551 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site