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 EB043A046B for ; Thu, 9 Jan 2020 17:06:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ACDBA1E493; Thu, 9 Jan 2020 17:06:58 +0100 (CET) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30043.outbound.protection.outlook.com [40.107.3.43]) by dpdk.org (Postfix) with ESMTP id 6B5DD1E488; Thu, 9 Jan 2020 17:06:55 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iLCjQYYFIclBPoSucW5IZrFU5LntGKbTzroBm79srRy3/VUOjidr10J5Zn0nocQWxtW1Y4O46lLs3VjRhmANFBmaNkfZtHgMl2Rh7NYfmNMHgYqbl5vTCxfkDzBHJJcwx8UqF4XueDkQBTGqZLHk9tHVRR17thZLuuWcFxUqTbAdHbdcR9JrhbN1EelZLoNySHxgi6hITVVat3Rzu17N9mf9Aj38pD+4WuydMtmOBYfrnmAbBYK2X6DhNllh+QB8/3mTSjKndUvu2avs2KoBRZjT1z0HsInE43fb3qt0r0L1QXsQ77lyrmL8N3wiNbwWUMKCUB/X3HA6PljU5FoLmA== 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=q1ueWkxseEj9XJSdRK14cxhXE2RZqMUyaiKcFUIAmwo=; b=BFVMo0CgjMxtE6yoqktr2vd8BCbpJDk5TOYQIYE6NxCoIGwk18Si8wl8emCUN3i/ULjO5hCcoPWshu73qP4g6yggRU12L1fZUDd7OvH9dkg7VeJLkt16fexb+oTdA6Gh6TqsaxL2nxa0mpr78S1YTOYjrRt0j8Y8GGHwmBdPkClt7zyUSUwV2bY1XY0lkTmb3l1zLTCMEuatLaC4JAJCu9OOQe5TEbu2WeFDdfGlR5oLytraJrBreQ6xluWbqcaM2hDKxB1rez6nwN1pJsZMkM/h8mfNorpZ4zNwyyzo79RdU48tAsSix6LkE6Vl5Njo3AGFQsmU63FrnMpMqyZGOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q1ueWkxseEj9XJSdRK14cxhXE2RZqMUyaiKcFUIAmwo=; b=mRnHM5vrPvbQJhAisoAuIWsy0/Apr1UGSzNojQlJ2dFV2iG6qviKQURpPEinaUXxxh+7Dw9bxFiBU4JpEuI6mQk2jCEY4DGzIaDhO168Og4rjqgLDe4au3yqpJAPoCU/Yx8ZdO0HrHhZw8sNbGHRAmowZFwtM4ySlDnZa4BzKBQ= Received: from AM0PR05MB4401.eurprd05.prod.outlook.com (52.134.124.20) by AM0PR05MB5617.eurprd05.prod.outlook.com (20.178.114.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2623.10; Thu, 9 Jan 2020 16:06:54 +0000 Received: from AM0PR05MB4401.eurprd05.prod.outlook.com ([fe80::d5e8:d078:e580:ffd7]) by AM0PR05MB4401.eurprd05.prod.outlook.com ([fe80::d5e8:d078:e580:ffd7%6]) with mapi id 15.20.2623.008; Thu, 9 Jan 2020 16:06:53 +0000 From: Ali Alnubani To: Olivier Matz CC: Andrew Rybchenko , Anatoly Burakov , "stable@dpdk.org" , "dev@dpdk.org" , Thomas Monjalon , Raslan Darawsheh Thread-Topic: [dpdk-dev] [PATCH] mempool: fix slow allocation of large mempools Thread-Index: AQHVxvCauUs5X2OVpk2l5lNJECbb3KfifYgQ Date: Thu, 9 Jan 2020 16:06:53 +0000 Message-ID: References: <20200109132742.15828-1-olivier.matz@6wind.com> In-Reply-To: <20200109132742.15828-1-olivier.matz@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=alialnu@mellanox.com; x-originating-ip: [176.67.114.145] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 70433c8d-bcc5-4eee-cc42-08d7951df1cb x-ms-traffictypediagnostic: AM0PR05MB5617:|AM0PR05MB5617: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1751; x-forefront-prvs: 02778BF158 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(396003)(366004)(136003)(39860400002)(13464003)(199004)(189003)(86362001)(33656002)(107886003)(6916009)(81156014)(4326008)(2906002)(76116006)(66556008)(66946007)(52536014)(5660300002)(186003)(8676002)(81166006)(64756008)(66476007)(66446008)(8936002)(54906003)(7696005)(316002)(53546011)(71200400001)(6506007)(26005)(478600001)(55016002)(9686003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB5617; H:AM0PR05MB4401.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NxFdWYmH6CVFFkkWuAS7JbEjPM787gZA0qyWxFVUhlRcYmiL8cD49j6Gwz/dKeww+MMemdHLHpaSP9GZD0MlToX1EKKaX1r9TzysCCKPNzUg9asEoSdpoy1Q3aR2Mdd+2KFx17NnocOaPJGjPQ1TkfR5jmQzJXhr25thFMWgmzythoqHeWQ8MdsQIZRSlrC+8B1DYAEkl/Gnccbp4RNieK4Eii1Un2EyQwZH2QArKjUvlc9J8e79chtbm8iHMuiM3fJeckECvAtpwKh1v96iqs0yL7+OZG3Mls1pwGzbuFwBrQX2vGn5oREULdEnA8yEUM/hN4ijOMqmDeGluCgcEswEBKcQYKRTfj6fPz7aYY8+bAclZSw63yAHdWgx4Tb3oIinUI/yY+NA1eLAFpPDCIv8G8abVqIJVyMMriXlpjgQ9Pads1YuDTfMPf+FKArBY/70Pr3OPBsR8Krz2usFueUB99QOCb9BZVIWvv5e3FXqwSepN21NrBkvZMLblEtB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 70433c8d-bcc5-4eee-cc42-08d7951df1cb X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2020 16:06:53.8130 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /K2OadlSe/F6KLs5akDBadn20EH2HAnU3MQwnfdBkWyIcREQaVdP69+INco7/Elm/xUlAUj2WGmuGDGubyZ2Nw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5617 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] mempool: fix slow allocation of large mempools X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Olivier, > -----Original Message----- > From: dev On Behalf Of Olivier Matz > Sent: Thursday, January 9, 2020 3:28 PM > To: dev@dpdk.org > Cc: Andrew Rybchenko ; Anatoly Burakov > ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] mempool: fix slow allocation of large mempool= s >=20 > When allocating a mempool which is larger than the largest available area= , it > can take a lot of time: >=20 > a- the mempool calculate the required memory size, and tries > to allocate it, it fails > b- then it tries to allocate the largest available area (this > does not request new huge pages) > c- add this zone to the mempool, this triggers the allocation > of a mem hdr, which request a new huge page > d- back to a- until mempool is populated or until there is no > more memory >=20 > This can take a lot of time to finally fail (several minutes): in step > a- it takes all available hugepages on the system, then release them afte= r it > fails. >=20 > The problem appeared with commit eba11e364614 ("mempool: reduce > wasted space on populate"), because smaller chunks are now allowed. > Previously, it had to be at least one page size, which is not the case in= step b-. >=20 > To fix this, implement our own way to allocate the largest available area > instead of using the feature from memzone: if an allocation fails, try to= divide > the size by 2 and retry. When the requested size falls below min_chunk_si= ze, > stop and return an error. >=20 > Fixes: eba11e364614 ("mempool: reduce wasted space on populate") > Cc: stable@dpdk.org >=20 > Signed-off-by: Olivier Matz > --- Testpmd (testpmd -n4 -- -i) fails to start after applying this patch with: """ EAL: Error - exiting with code: 1 Cause: Creation of mbuf pool for socket 0 failed: File exists """ This is why the check ci/iol-mellanox-Performance is failing (not sure if t= he other tests are failing for the same reason). Regards, Ali