From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A67A3A0C43; Wed, 20 Oct 2021 11:01:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 893B840687; Wed, 20 Oct 2021 11:01:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id C368A40142 for ; Wed, 20 Oct 2021 11:01:55 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19K2OkU8015218; Wed, 20 Oct 2021 02:01:52 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by mx0a-0016f401.pphosted.com with ESMTP id 3btaa79gvw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Oct 2021 02:01:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JRPW21GkaxcDidtsym3LswyfFlCLODAeoKBrkMGv1zEjrT12TgYfobDX8Cpr/PAO8rgMPsLOiELYqOBwqRa8GSpIntYGy/UEcnyj5pvJbZmQkFTXTETBSSzXCidkuGCaHP8dijBjtYtt4xw8TAMA9TTlPdfZqMUg560mGxC69XGokZOQNkx/X2VEtza855GSvpj+cWHl5tIaupltD8hdaSeHpzUUmEtc1GRnSAdEeVzBrZ4AKDhlslffrw9YhELV+6QwPeGbxa+wWt05E5xADRffv8fVBgbgYF90zN5SROBpi6LZkSlyjfqFFbRSjYWufMVKs3opT6jCO+lUZ8K8lA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=YtYt+xhmjs+l8JqlOq9Pi3GOEGvjp5owfGAFlY+TiOM=; b=ZojPhaUUumb43J0vS/Bny9yFhU0ab2ODLEfZCFam4XBdK8/0Iuh/TjgrmtZiOTE2xgU5QfkGPARJyPe0XAGajRlFPFvFSaHP2FJ0olFYgFiIj3zAMl9+SR+s4cRMlvgSY8BVtpdwmqvzaUHYeXFyD8a+6BWYZ3WyMTYEsc4NQwMIR2qMzHpqBWRqDBOKal1iNteM6WVnk+0KYk4CJUr2ld/aXYl0SrWlXINT9dy+UkRKNB+OSVMMyFWf6Tlpo3/m23h6ivKZkO/Cb0sIHWjpU5aU34oqqR8LwB+htlgdxCCxifkUT8/s90mZkuRZjNZpTpTETuXj5/po15opuA8hig== 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=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YtYt+xhmjs+l8JqlOq9Pi3GOEGvjp5owfGAFlY+TiOM=; b=A1CV1JsN6EjHQnDULoACyzVtuNvF0Ws5E/SDn5vKTVnir+EWt3iKGVnH9VOcYAD8Zbbpw6DGxZL1qj598mJep8ylN3BvHH8Z5f+yb/+pFCqJ1x7GPIruKwSOrhhRQ+dfqTrExQS2WAzpHRPOA6Vn8GiU00Ggzx3kgtqnpnzfvFs= Received: from BN9PR18MB4204.namprd18.prod.outlook.com (2603:10b6:408:119::18) by BN8PR18MB2529.namprd18.prod.outlook.com (2603:10b6:408:95::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Wed, 20 Oct 2021 09:01:48 +0000 Received: from BN9PR18MB4204.namprd18.prod.outlook.com ([fe80::29f4:8e3d:264f:26b1]) by BN9PR18MB4204.namprd18.prod.outlook.com ([fe80::29f4:8e3d:264f:26b1%8]) with mapi id 15.20.4628.016; Wed, 20 Oct 2021 09:01:48 +0000 From: Harman Kalra To: Dmitry Kozlyuk CC: "dev@dpdk.org" , Anatoly Burakov , "david.marchand@redhat.com" , "mdr@ashroe.eu" , "thomas@monjalon.net" Thread-Topic: [EXT] Re: [PATCH v4 1/7] malloc: introduce malloc is ready API Thread-Index: AQHXxRgqpd5vf9Bv3Um6uXgiHjGzg6va33uAgAAAyICAALeUIA== Date: Wed, 20 Oct 2021 09:01:48 +0000 Message-ID: References: <20210826145726.102081-1-hkalra@marvell.com> <20211019183543.132084-1-hkalra@marvell.com> <20211019183543.132084-2-hkalra@marvell.com> <20211020010115.236b9640@sovereign> <20211020010403.539d247a@sovereign> In-Reply-To: <20211020010403.539d247a@sovereign> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ef975927-4f20-478c-1035-08d993a83fd0 x-ms-traffictypediagnostic: BN8PR18MB2529: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2201; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wpTAABktJKowdk1/cYEUWy5oWalfLdGAbKMVp+CETPcsL9A9QwIGBwcK1JiVR4Fi4a+iyLKHdxbrFsPETldeR9GAZAZBTJaMCGXQhBign5s1W1OWHd3HLzAoIISNdorMsg8/ny6mX3wEdgNgx7gI+MqF5Pvw+elT5E4XZWNIZ8cueM57jr5zAnpQasxIttVRQbgHLiKZq54FUPkXD/7Lw1hziuBPt6fWzSjVGTcfjkTdyc0Ml1ck46Bn2svgN+8yPlRPdwO0Uq3QwdsqFU+KWoQrtFQ/BO9hObZfLHn13LjDVYiG3ykmH0gZqtGehJNQjn+rma76Ov5DQLa0ROay2COr/76hgApXrga1UCr00ysGM3HvCr9PY9Ikc8cxomGj4MPmX4svaWjC+wDD+cfdemj88QtnogFFtnwCkzvOTzvqtlfUqRWEQa54ddaqShaBigAdxGoNUef4IDComjfOoJrk4CSg01Mvr9CV+/qudBxaXkwsxjmH6ZYO6MQekHLZlNlU0ng7ukH0IhFM8sPVKN0PBWrOeWAdO4axoEaSwfFkplpD5pQB+OdKfsST2EQBRINUiska4sd8ONn46G8QgGisLZpbyb+QT9jZQicJRUSFHIqXw4Nk79SkLkjR2SX19SZGHeKTgliFmQJLwPp1T/XXLFpKtmgjIlLPj01od+SGhaWq6HY3K+ku/MnUec1+8pOYXHNnLgdnNcvdgMVOoQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR18MB4204.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(55016002)(8936002)(9686003)(53546011)(186003)(26005)(6506007)(8676002)(508600001)(76116006)(66446008)(66556008)(66476007)(316002)(38070700005)(7696005)(2906002)(6916009)(122000001)(86362001)(71200400001)(64756008)(66946007)(52536014)(5660300002)(54906003)(83380400001)(38100700002)(4001150100001)(4326008)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?NnCsZy8Vbl+lowgSW76RMVbeZvwWrbJYbcwhbwmkK6Qf/fdbGuMgB2HhyaFa?= =?us-ascii?Q?SQE2yogDbDd4iIy6XQmwxen+kuW+nTaJbzBNU/A51QS1ziz49i/oqUOee2Fj?= =?us-ascii?Q?Dg36A5s0Mg+R3qt10hW/Yu2783b8NlB45RN9Q0tkZo40RtfagZCdQtv/mT36?= =?us-ascii?Q?5vc6WUsyqOuAhrVchip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MfJYKZIuEF9ilc7ZlEuJtrYN2/OaDSJ2Gyc+Xn9U1lCe/Dj37T5JvfY75w?= =?us-ascii?Q?M7z3KqsY7kX+mYF8wv7yN2YIadAIkq8TArPs54YrJ39k68kyGQh9w+76jcDR?= =?us-ascii?Q?tyWzjdl3xD/zjg62PqRlitLHwN2LxAtOtbm+tJcOUpYn0EA+YuOlQH4i8oSo?= =?us-ascii?Q?O3vdFotZDRMR6cduYzZS/+jJz4aUItEpEFnWOZfJBmFgFn5nuYqvvCQtsj4D?= =?us-ascii?Q?7MoX7p6sZamCqwQwXyANf4lx?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR18MB4204.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef975927-4f20-478c-1035-08d993a83fd0 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Oct 2021 09:01:48.1894 (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: hkalra@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR18MB2529 X-Proofpoint-ORIG-GUID: 5icV585jO1EZHjyNKa0zQjN3x2TvdXgF X-Proofpoint-GUID: 5icV585jO1EZHjyNKa0zQjN3x2TvdXgF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-20_04,2021-10-19_01,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v4 1/7] malloc: introduce malloc is ready API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" > -----Original Message----- > From: Dmitry Kozlyuk > Sent: Wednesday, October 20, 2021 3:34 AM > To: Harman Kalra > Cc: dev@dpdk.org; Anatoly Burakov ; > david.marchand@redhat.com; mdr@ashroe.eu; thomas@monjalon.net > Subject: [EXT] Re: [PATCH v4 1/7] malloc: introduce malloc is ready API >=20 > External Email >=20 > ---------------------------------------------------------------------- > 2021-10-20 01:01 (UTC+0300), Dmitry Kozlyuk: > > 2021-10-20 00:05 (UTC+0530), Harman Kalra: > > [...] > > > static unsigned > > > check_hugepage_sz(unsigned flags, uint64_t hugepage_sz) { @@ > > > -1328,6 +1330,7 @@ rte_eal_malloc_heap_init(void) { > > > struct rte_mem_config *mcfg =3D rte_eal_get_configuration()- > >mem_config; > > > unsigned int i; > > > + int ret; > > > const struct internal_config *internal_conf =3D > > > eal_get_internal_configuration(); > > > > > > @@ -1369,5 +1372,16 @@ rte_eal_malloc_heap_init(void) > > > return 0; > > > > A secondary process exits here... > > > > > /* add all IOVA-contiguous areas to the heap */ > > > - return rte_memseg_contig_walk(malloc_add_seg, NULL); > > > + ret =3D rte_memseg_contig_walk(malloc_add_seg, NULL); > > > + > > > + if (ret =3D=3D 0) > > > + malloc_ready =3D true; > > > > ...and never knows that malloc is ready. > > But malloc is always ready for a secondary process. >=20 > That is, before returning 0 above for a secondary process malloc_ready > should be set unconditionally. Yes, thanks for catching this, I will fix it V5.