From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751195AbdBTGZZ (ORCPT ); Mon, 20 Feb 2017 01:25:25 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40601 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750872AbdBTGZY (ORCPT ); Mon, 20 Feb 2017 01:25:24 -0500 Subject: Re: [PATCH v6 1/3] perf: add PERF_RECORD_NAMESPACES to include namespaces related info To: "Eric W. Biederman" References: <148654265580.27983.8822211570127163843.stgit@hbathini.in.ibm.com> <148654268436.27983.5340774362600828412.stgit@hbathini.in.ibm.com> <87zihmtm1k.fsf@xmission.com> Cc: ast@fb.com, peterz@infradead.org, lkml , acme@kernel.org, alexander.shishkin@linux.intel.com, mingo@redhat.com, daniel@iogearbox.net, rostedt@goodmis.org, Ananth N Mavinakayanahalli , sargun@sargun.me, Aravinda Prasad , brendan.d.gregg@gmail.com, jolsa@redhat.com From: Hari Bathini Date: Mon, 20 Feb 2017 09:46:03 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <87zihmtm1k.fsf@xmission.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17022004-0048-0000-0000-000002076C8D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17022004-0049-0000-0000-0000478FF1D5 Message-Id: <45ec7ff8-cddf-56a5-95da-0e46cfb21b60@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-20_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702200042 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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