Received: by 10.223.164.202 with SMTP id h10csp962138wrb; Tue, 7 Nov 2017 18:33:35 -0800 (PST) X-Google-Smtp-Source: ABhQp+RPeBoKR//EHqRiSYccVVb1gMIVqA3qqxxF+2Zd8j2UzdRlKLVd+1LISYAuT1FOtMijtipG X-Received: by 10.84.236.12 with SMTP id q12mr751427plk.204.1510108415481; Tue, 07 Nov 2017 18:33:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510108415; cv=none; d=google.com; s=arc-20160816; b=mCWE1R5WhiMEfkyjaeUN7DqvFHW0q7uJNh7w16OCUiy1UnT6TL2fQlzBD1YHLmYcFI eO/eL1muFZfY4RvT64A7AZTFY6Sk1NEur85EOsLmKYKA+Yqtzn8BXQnX33LG57PBWJ+0 yoy7rKHfqp6yN9mTzfUEmJ5uzrbgLZacPQKuhxIJ2I7FoWm4jSI0cTDdDgE1Jyj9JLn3 bSVwHgBT0ndkvSWPetp+X4x+bTZbFMugKnAXMZKNiNCT1ULneKtaebpZlplDd3eVnDC0 iHcQHKV93iLLiPiI2Q/RPTcwXnO40ij6p9YSoiJtHJl+a15ZFddXOIGHxuWeZxO5fQzG nTvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=zjEPSGpejFozq0EHtehtJ3lrNBt5kRlVY9JeBNRUjsk=; b=JVeURmCGJ+Sb1URLhh5VnrQMfREFyDfDaiZGKqp7FJSrV06obDpRHOnwOSsR/PrrnH Dg70jVoHcfMIAaOtHZ1qAmIZ8GhOBaHVIJVFRRqnG4w0J+bh6VE7mr9QIQHjvQL4Hx2X hYVEYGCNfFRtDUg8DDQMUYkUbcCrlva0l9KOTPKdc0xVp7cmfGiqUOo0tsRG7LaKR9xm xKODcmqzXGQQv4xungqAbNglYaMtNiC0Cg1jjp3qyeUu5LRPF4aT+7YKpYq6w3EQIY4b gh7a5e77cM5pxHoJXaPdUU2kEm1TDdzOpY+NkKXV8VgW7D0lDvEZYHJDR+B61wGLFaE/ brMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=H31n/K5G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si2568584pli.472.2017.11.07.18.33.23; Tue, 07 Nov 2017 18:33:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=H31n/K5G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754669AbdKGTvx (ORCPT + 90 others); Tue, 7 Nov 2017 14:51:53 -0500 Received: from mail-eopbgr10129.outbound.protection.outlook.com ([40.107.1.129]:61600 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752485AbdKGTvt (ORCPT ); Tue, 7 Nov 2017 14:51:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=zjEPSGpejFozq0EHtehtJ3lrNBt5kRlVY9JeBNRUjsk=; b=H31n/K5GrwxFlxrk0RLE9JDzwPgNMfJEUG7ei5ZyPppMfskO43JCmL3FNplfsMCWCOBf3Q8tGj4yD64KLs7sHeTFAKACKmpZVw+Uf6vl5bu53Azx/lvY6OMUkGSDMTblJCAIMZNgc9Oj5qaqUMXnZDvAFndj9rTwkWcrKPd5IpE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=avagin@virtuozzo.com; Received: from outlook.office365.com (65.152.152.74) by DB5PR08MB0741.eurprd08.prod.outlook.com (2a01:111:e400:599c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Tue, 7 Nov 2017 19:51:43 +0000 Date: Tue, 7 Nov 2017 11:51:25 -0800 From: Andrei Vagin To: Vasily Averin Cc: linux-kernel@vger.kernel.org, Hari Bathini , Namhyung Kim , Jiri Olsa , Alexander Shishkin , Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra Subject: Re: lost path_put in perf_fill_ns_link_info Message-ID: <20171107195124.GA15483@outlook.office365.com> References: <20171107190318.GA31295@outlook.office365.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20171107190318.GA31295@outlook.office365.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [65.152.152.74] X-ClientProxiedBy: MWHPR09CA0007.namprd09.prod.outlook.com (2603:10b6:300:80::17) To DB5PR08MB0741.eurprd08.prod.outlook.com (2a01:111:e400:599c::11) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3ec2bb0-3767-472d-fb43-08d52618f964 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603249);SRVR:DB5PR08MB0741; X-Microsoft-Exchange-Diagnostics: 1;DB5PR08MB0741;3:kskyaU5vIAWjpepHVhdIr1L9BtnXtsz0ivAirmfRp7VmoXEog5Z3IjPAslSQ5o0NQHqW672QFd4bEm684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LfMXbsMRxVuf1Ip4dTmw1aF2Pztp7d6FRexW5vBnB4gM7PmCisV/yr+qMb/82Kwn1hLu7wYvQsszQxkMX74mWmd5gDyUDbdzB/LZehYDXUKhZq89fN6mAs4qTaCBDTALycNXL4TwDyiLmOGamVtutLmC2Py1w2irXwaLTxGDk=;4:U9kdwKAF2BlYrSx7NV6XHWnZkhEAQFfry8tI4UcY4LMzuO7dnVV9H2v495jrrRGCXHqXVCokHE0I00uPlKKl4Yyes0n2d0iy9U2nZjOel2hoLshStPb1Kkle2FFZ8l/kRksUHf6teF8imS0j7eyKA2Cm7uucnEVvXuUqCLkeHoNqqQxQIoftQk5H6Qr+hXcGhZFnF2MjcbO2bFN3ICp/JdyNMeXYEKuc3CnrZDJlOg+CrjlyVey3Vz4Pfyxh5vM+SX+A1O8A/Ntnt6tEi5mq/g== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231021)(100000703101)(100105400095)(3002001)(10201501046)(6041248)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB5PR08MB0741;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB5PR08MB0741; X-Forefront-PRVS: 0484063412 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(346002)(376002)(24454002)(189002)(199003)(1076002)(6636002)(2950100002)(6666003)(76176999)(50986999)(5660300001)(101416001)(8936002)(50466002)(8676002)(189998001)(81166006)(81156014)(53416004)(58126008)(6506006)(16586007)(66066001)(54356999)(47776003)(316002)(2906002)(86362001)(54906003)(33656002)(7736002)(25786009)(575784001)(305945005)(69596002)(478600001)(97736004)(229853002)(68736007)(83506002)(6116002)(3846002)(6862004)(6246003)(4326008)(23686003)(55016002)(53936002)(9686003)(106356001)(105586002)(16526018)(18370500001)(19627235001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5PR08MB0741;H:outlook.office365.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?koi8-r?Q?1;DB5PR08MB0741;23:ZsB2VO5a/yvMp3yZu8FUFltRv8SJ37UzPfTdKwL85GC?= =?koi8-r?Q?H5MGHn5iWzFCRko3lMs2FqvJxNmn5oy1Ku7/X7bPN+ljkrGQrW/WxTXCkH1uvD?= =?koi8-r?Q?lJExO+kVo1ehv3AnvB3cY5qFMVqTtdEZS+lhprisTAqZ2/PtYOHFSPxMC+BwZx?= =?koi8-r?Q?pym6CbDAKpfCArAd7q4VSKhIJIdkNTK6LG0Xr5Js86+Qf2nXUq0ZYqW+QrkBNW?= =?koi8-r?Q?6Y+pCqxYIIE1BWj5cr9h3eX4Bdalrsj5ZuCgwliQNPl8JGQKdEkIowDO9PmIfa?= =?koi8-r?Q?mNQhDEk17d0DRG6SbwTlnORaw+nYpshdM0CGk7OXoXcSHjOEGRjNYHkZzJuNng?= =?koi8-r?Q?//IVn8hfQGjt1SKp3T0dLluad184V972bh5sl7Gcbhk438ghqbUv9GEtFEdjuA?= =?koi8-r?Q?9tqmqLqc+zgBXHTGWsnZRaO/f3UXdbrboDe7Qk5EpcdhvG70A8uCz9F7pYvq7U?= =?koi8-r?Q?Bj5QqVFX1W5IMEqPckJSmVAfmSb/LxcRSzQDHUhxI8xqmqEw8eDxhLK/Fgvae3?= =?koi8-r?Q?vNb+wEAWwbfbYm79GHuHKmYJg3zVSEu2vXoj6HOB0h/0YigVeKjTANUx9B+0+D?= =?koi8-r?Q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A38rCfoY0EZ26Q8jjAktmohFjQC0yhCUXVIERNK1d8+5/zbuEcCCzAxvGTHWdvMAq/zSOcO1T08T4MRPALh85/pVp+x5iShBdpYIk7RJ7MvWeSEgaQar1rXYR/uC4BYpfrSkL6/m0tvSXo/Q9W0BEPFUCbJAzw7rRgagSnYBAybf97iJOHM8roJ7mOjEQ=;5:OcXIzIsZMyfrPiUL0wtQLn05mLOvuzzP2BDpXRFIehv5UV9HR0Quap+ZPD63xcuiVzIEro0W7afh0Kr+pgxxHQ9fNMSzBvKjgLfJkXDJ7KsnFPb2pjD6hd9P8PzIpek6SJI28VdmXOZ0uaPQP7GHXbIO11JJA3n33xcR2I6JF2A=;24:G+qQ6Gc+bTTFeE11y1RtvkZuofJzSu+zuaIm+cB7I7a9QdfPn+A54oISwPlk9IDskxcjQ/qxTwW5Etf7V3Wm+gx39pL63Oz6LHXCf3YnPx0=;7:mGqr45utK3Yz/Wi6mP8GCP25aIUk929d6Ja/y6v6Hv9lYvEo8nPwhjfal+3HZI99MzsmC9cdMtNQqW15ucQqzVJLkQSwUQHuEurUGyk6PCBpoUqJxJ4uZupRHHjI1ndAkMaWNC5br0Q3lj6a6XP9Bu1Wh0BnjEIYs+QL7FXim01xyrmRPqfqcr1SuYkjrF3hHDO5pcXkXOvYo//zGH0O8tFAC/UmoTmFUPtqOewktibfe0TNhV/lhewTG5m/0aZH SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB5PR08MB0741;20:f8/ZHvl/62r46ImbBD2Jlrd1jojLxb/8rh2JO2n/5O28In5dMWFUlNSJ1TUKSQrmO9l7dlmd9rog3VX3Yg82mYdNaZBURurB/shpucPd9eBI9PprAbCW1obtsH3p7Xr7DapSrVkg6QmH7V18YH2pd0UfOGJf4ZS1M+JnBG8f4es= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2017 19:51:43.2226 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c3ec2bb0-3767-472d-fb43-08d52618f964 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB0741 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 07, 2017 at 11:03:18AM -0800, Andrei Vagin wrote: > Hi Vasily and all, > > The patch looks correct for me. I tried to reproduce this issue and > checked that this patch fixes it. Bellow you can find my test program > and a command line to run it. The problem still exists even with this patch. > > $ cat test.c > #define _GNU_SOURCE > #include > > int main(int argc, char **argv) > { > while (1) > unshare(CLONE_NEWUTS); > return 0; > } > > $ gcc -o test_unshare test.c > $ for i in `seq 10000`; do perf trace -o log unshare -u true; done & > [5] 28766 > $ for i in `seq 10000`; do perf trace -o log unshare -u true; done & > [6] 28840 > > $ echo 3 > /proc/sys/vm/drop_caches | cat /proc/slabinfo | grep dentry > dentry 74848 78660 224 18 1 : tunables 0 0 0 : slabdata 4370 4370 0 > > $ sleep 10 > $ echo 3 > /proc/sys/vm/drop_caches | cat /proc/slabinfo | grep dentry > dentry 75145 79002 224 18 1 : tunables 0 0 0 : slabdata 4389 4389 0 > > $ sleep 10 > $ echo 3 > /proc/sys/vm/drop_caches | cat /proc/slabinfo | grep dentry > dentry 75921 79776 224 18 1 : tunables 0 0 0 : slabdata 4432 4432 0 Actually here is another issue, and it is reproduced by another script: for i in `seq 10000`; do perf trace -o /dev/null unshare -u true; done & And it is due to files what perf creates in /tmp //tmp/perf-vdso.so-84wDCZ //tmp/perf-vdso.so-YDfUuX //tmp/perf-vdso.so-KkTBfU //tmp/perf-vdso.so-srXfvU //tmp/perf-vdso.so-QrPscR //tmp/perf-vdso.so-wlxIZO //tmp/perf-vdso.so-ur4fBP //tmp/perf-vdso.so-gBMExN //tmp/perf-vdso.so-6sCehK //tmp/perf-vdso.so-cZ4GDK //tmp/perf-vdso.so-ImQLoH //tmp/perf-vdso.so-y4rMuF //tmp/perf-vdso.so-Wx1qIG //tmp/perf-vdso.so-g5mYOD ... Do we really need all these files? They all are identical. [root@fc24 ~]# diff -up /tmp/perf-vdso.so-fnVcRz /tmp/perf-vdso.so-FQGYzh [root@fc24 ~]# echo $? 0 > $ git log --pretty=oneline | head -n 2 > c83bceb10b36cef895def4b2dfe0aff6ca7c9784 lost path_put in perf_fill_ns_link_info > 8b82a8a7ab53ee1a065ac69c835737a701f46b2e Add linux-next specific files for 20171107 > > Thanks, > Andrei > > On Mon, Nov 06, 2017 at 09:22:18AM +0300, Vasily Averin wrote: > > Fixes: commit e422267322cd ("perf: Add PERF_RECORD_NAMESPACES to include namespaces related info") > > Signed-off-by: Vasily Averin > > --- > > kernel/events/core.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/kernel/events/core.c b/kernel/events/core.c > > index 10cdb9c..ab5ac84 100644 > > --- a/kernel/events/core.c > > +++ b/kernel/events/core.c > > @@ -6756,6 +6756,7 @@ static void perf_fill_ns_link_info(struct perf_ns_link_info *ns_link_info, > > ns_inode = ns_path.dentry->d_inode; > > ns_link_info->dev = new_encode_dev(ns_inode->i_sb->s_dev); > > ns_link_info->ino = ns_inode->i_ino; > > + path_put(&ns_path); > > } > > } > > From 1583463138892775043@xxx Wed Nov 08 02:28:46 +0000 2017 X-GM-THRID: 1583296720926435526 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread