Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1582491

Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info

From ebiederm@xmission.com (Eric W. Biederman)
Newsgroups linux.kernel
Subject Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info
Date 2017-02-16 12:40 +0100
Message-ID <tbszM-5Ab-11@gated-at.bofh.it> (permalink)
References <t8vXc-6oU-27@gated-at.bofh.it> <t8vXd-6oU-49@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> +/*
> + * 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.

Eric

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info ebiederm@xmission.com (Eric W. Biederman) - 2017-02-16 12:40 +0100
  Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Peter Zijlstra <peterz@infradead.org> - 2017-02-16 12:50 +0100
  Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include  namespaces related info Hari Bathini <hbathini@linux.vnet.ibm.com> - 2017-02-20 07:30 +0100

csiph-web