From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99D64A0353; Mon, 4 Nov 2019 08:52:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1BC6C49DF; Mon, 4 Nov 2019 08:52:28 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 940833423 for ; Mon, 4 Nov 2019 08:52:25 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xA47puWt026355; Sun, 3 Nov 2019 23:52:24 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=pfpt0818; bh=991C3tCai+uLhjOtYe94jMVQ2U0kTX31bC7s4MQmtl4=; b=GfWAyBJLLTqtDPYq/GF68VkEvYvlbqsj7+bMZnbO1bajJ4BfxNXq/jGWL7/eVGtqr10p hRcP2Xn/fAmDYqHwhsGgZe95LBEO+tVa9gUkjfjKtXfXa4MVxeVeTwLJLQSR7K+yDW3q U47fdzh7ccyEp1oks8OzHu6mGSCcn/qAQ6fvP3c41mB+VsENe3IjoK7BhJtUncogEg3k oNBx2V9zvZRiHzHoF99py4298VXjiW3Kh5/rZ0GDuhxuTgwqtd30/U1bB5AKHpuofwMY 7/sWvCzEmm2M9nue8S8gyxR6AB44iJT2U3L1Sy4vY+1VVErSrPsFHnNXMU24Vq7rrMDu gw== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 2w17n8vwhh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 03 Nov 2019 23:52:24 -0800 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 3 Nov 2019 23:52:23 -0800 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (104.47.45.51) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Sun, 3 Nov 2019 23:52:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eCrwvizV9rbOBWxPmHznQJBPNinovOro3msDOS6WrOlT8QQlS4ercMNP8Zl08Ke41iDRyDaomXvT4WdjpL5vAzm4TsUgCx5SKG2oeu2ACZ/fxXMh2WBbCeWYXM5WQ6ZfBLgb1r/p7MQSctT1mxfer3cPVZt3vk1bdSBD3Y0ZqJe1FpvivXAKThyHVd5er9I4cTY19bGrYMVtWR5z7tsks44h4YXyFiWu/lmfYY8/9mU2Kn4mKoOpOhadIarBLgG/i5z4wULf9PqjcT+Y5NIvjFTRyhVdAxAsREcp0jjwNGJVxor4ZdFutGMeZqLcS4S2QbxgFlBf348gPNIA1wOg9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=991C3tCai+uLhjOtYe94jMVQ2U0kTX31bC7s4MQmtl4=; b=evW0lVyHeQSpOwsywm1Yhh2Yuxw08fI9lwEWPZtMPLRMU68SGeFtq3eK3a8hKFgCnXBhEgOgEujkT0CtctCA6XPGHyiCYPfbiSEfLZjgF/bmGZ0QFE2z9KnFYPanwdAX4MRiDMbJGSA7h1PT86rQa8LdnPXTRVBsxeCpHyK3ljZ5kFm1JggTgGZo+jPcyTW1jO77dHLcWsX3WhP5Q8aQPB4Llye9mxQC68bYspIUy1JSRWDIqmg0OmWHmZ5m7vCB8lro2IQA+UEuktWN21Ek3EvzUWJ2LyAQQJ4uCHh/R+sBT1+l/2V6WxMFb3akiLAsV76HynbvwjfBcQFEoM3tYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=991C3tCai+uLhjOtYe94jMVQ2U0kTX31bC7s4MQmtl4=; b=UbfXRi9R05n2PQMJZnNS9FPEd0lFGYrp/3fmvxr+i1zKic8p3R4zp18Klpx7HHLxMfYiSwjaguGvD9mN/+DNHZurNJAFIqkMdtykpjpXFE/ESnphz6dc7DiATIVu/pXv9VGFGPt4nUerXPof+4KmysNzXESZ7dZS4oAUVpQKS4k= Received: from MN2PR18MB2640.namprd18.prod.outlook.com (20.179.81.96) by MN2PR18MB3151.namprd18.prod.outlook.com (10.255.238.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.24; Mon, 4 Nov 2019 07:52:22 +0000 Received: from MN2PR18MB2640.namprd18.prod.outlook.com ([fe80::c07a:1422:b537:122f]) by MN2PR18MB2640.namprd18.prod.outlook.com ([fe80::c07a:1422:b537:122f%5]) with mapi id 15.20.2408.024; Mon, 4 Nov 2019 07:52:22 +0000 From: Krzysztof Kanas To: David Marchand CC: Krzysztof Kanas , dev Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v2] test: fix process dup fd close Thread-Index: AQHVYXPEfg8vjJs8XUO1HDtjvJTUeKdzP5wAgAfHDYA= Date: Mon, 4 Nov 2019 07:52:22 +0000 Message-ID: <20191104075219.GA8346@kk-box-0> References: <20190902075251.2917-1-kkanas@marvell.com> <20190902094939.20482-1-kkanas@marvell.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [199.233.58.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3c98c5c0-1b71-4430-67e4-08d760fbece0 x-ms-traffictypediagnostic: MN2PR18MB3151: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0211965D06 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(4636009)(136003)(39850400004)(396003)(346002)(366004)(376002)(189003)(199004)(81156014)(8936002)(99286004)(81166006)(33716001)(476003)(14454004)(6916009)(11346002)(446003)(66066001)(486006)(25786009)(5660300002)(86362001)(478600001)(54906003)(2906002)(33656002)(6246003)(305945005)(8676002)(7736002)(1076003)(76176011)(6486002)(9686003)(256004)(186003)(6506007)(6512007)(102836004)(229853002)(66946007)(66476007)(66556008)(64756008)(66446008)(91956017)(76116006)(3846002)(6116002)(71200400001)(71190400001)(14444005)(53546011)(316002)(4326008)(26005)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR18MB3151; H:MN2PR18MB2640.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Q16JDdMqb0EKxFSnYDHGD5hnfSvUbYuzeNW3dEvfaDwTjpYqHr6MusfFVWqJf8o+fT4M4THYniIxzkd47bpG8MA2TMJ3049By/ZFNvE7EbZoB54hPwRRqLJ2pRDRLJWCh137W3G6XKmz1C+KjcSogTkKEkKKMnBv05kJJQPdWK/NnXjcNxhWwxNQAAfWMSaJ+qCo4nDhToNxTDo+m++EF9lAvaPdbOXfMH/Axt+1tJfKDmT3wVR1VNRixxFJC2y6FXigNnkSNf+Ufczap+QPTCWYzKLiqR98/0nkL3LXPVv1tVVpjzjEcAwRkLey3GSAcV7/TMZvEYS3FKXJIfWMzkxCmmHz9gx7LtzUHx+ooii7LGWeu6HVUBJaamRPh8qlkCzunjy/fIYlZdeKM50bi6y0gp0/c6MAPkvfRx/aw0q+sW3gVJ9yuvgrG0gG76Ov Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3c98c5c0-1b71-4430-67e4-08d760fbece0 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2019 07:52:22.1233 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: z3vFKgq6qHe10c/iwNmEazAtHZDVXKv6zF61FKny3Z7BD46y9eQRIr2uPLVPCIcGdjRZtQDkFQo+q1/GrHWAaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR18MB3151 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-11-04_06:2019-11-01,2019-11-04 signatures=0 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v2] test: fix process dup fd close X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 19-10-30 10:06, David Marchand wrote: > External Email >=20 > ---------------------------------------------------------------------- > On Mon, Sep 2, 2019 at 11:50 AM wrote: > > > > From: Krzysztof Kanas > > > > process_dup was intending to close it's own fd's but failed to do so >=20 > A bit hard to digest, what is the problem that you want to fix? >=20 > Thanks. I don't recall the exact test name but I think it was test_eal_flags=20 that is included in the meson test suite for fast tests. This test was timing out on ARM64. Using strace (-f -c IIRC) showed that the process is spending most of=20 the time in access syscall trying to close not existing fd's. - for (fd =3D getdtablesize(); fd > 2; fd-- ) { - snprintf(path, sizeof(path), "/proc/" exe "/fd/%d",= fd); - if (access(path, F_OK) =3D=3D 0) - close(fd); So the simplest way to do so is to close only the opened fd's not blindly try every possible one. Also I think the code was wrong in another way as it tried to iterate=20 over /proc/ *exe* /fd/%d/ when it should iterate over /proc/ *self*=20 /fd/, so either the comment bove the for loop was wrong or the code was=20 incorrect. >=20 >=20 > --=20 > David Marchand >=20 --=20 - Regards, Krzysztof(Chris) Kanas=