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 D7457A0C41; Wed, 20 Oct 2021 00:04:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E2CF40687; Wed, 20 Oct 2021 00:04:05 +0200 (CEST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) by mails.dpdk.org (Postfix) with ESMTP id 1AAAE40142 for ; Wed, 20 Oct 2021 00:04:05 +0200 (CEST) Received: by mail-lj1-f176.google.com with SMTP id e19so8739174ljk.12 for ; Tue, 19 Oct 2021 15:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZWvRQWpAu4MTglmnhBvAZ0HEaPmSBRGyJLs+Q4ohdOQ=; b=Zywiv1MaM81JVXBL5dd6LIOBgFcrnWXJhznZ92uAlwv3HtlGito1amPAExVpB3Cdou e5V/QG5XEtv2Cp4H4405UeP/7Ija4hzJNmlZ3H2shRc6hGFT73teGQtvdux1voOCxiWg s7P442hR/zbvNZJWhiVsw/8v6EQJ8+Mkud1E8JRSaKL2uhSYFEAjkqeqDVGEfBvpfQNd GN+nPEIEAcfCleFmJtd3IvRCeiYoEjyp0LeTOteVJas/aMslevwQPqcmt6H+uZAxUAc9 rImmN0bfKgN+Jff1msq002K8t+0zv90JnHwqsdFxSm71nx/3rcKZ8pUB47exdqF560ty 3qMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZWvRQWpAu4MTglmnhBvAZ0HEaPmSBRGyJLs+Q4ohdOQ=; b=URtsjJIuoMEHz/I1nIaqopjRvBDKDGNB165XUh7lsiSgVKlHuo5+cxYCK3T6lBzuOS T7e40C/YbFhHEWmz1NlYdi8W0wjHRf6osy34/VDo1OK2ARXWPsRO5RhfFzbAO0DGZaJ3 hIvaEyDwGis/QacAkzAR+ATdSZ+O8c8vUcYbcTO7NtyFJfAHkXwOHCevub8Nqy5cImYi q+gLPdlAmCAn587UPSVHCoehbVWA8yAcq/vN3HIyTBdEXjEt7SLbeyhLwE3re7Ix1m99 Kc6mhnSD0Af5KTTbU5GWb0ej1AbJGF57dAlu1NDvvCiYvZ88jTObdFKKopNSNfjcbWlQ 7s0g== X-Gm-Message-State: AOAM533U5ubJsZ4ayUY4SmiknjZ2VC8PKjxwqsUFvR3gI8zCa58WF/bc +U0Iqy6caXC9woYqrjb1GGI= X-Google-Smtp-Source: ABdhPJwnubqdrb0MKlUDh9L65YAQkceAurmuMJHO39e/NE2sm35AB2CR0JxWGVWRNdCtQIq2Vw4cKw== X-Received: by 2002:a2e:9993:: with SMTP id w19mr9267483lji.98.1634681044530; Tue, 19 Oct 2021 15:04:04 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id g18sm32542lfu.4.2021.10.19.15.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 15:04:04 -0700 (PDT) Date: Wed, 20 Oct 2021 01:04:03 +0300 From: Dmitry Kozlyuk To: Harman Kalra Cc: , Anatoly Burakov , , , Message-ID: <20211020010403.539d247a@sovereign> In-Reply-To: <20211020010115.236b9640@sovereign> References: <20210826145726.102081-1-hkalra@marvell.com> <20211019183543.132084-1-hkalra@marvell.com> <20211019183543.132084-2-hkalra@marvell.com> <20211020010115.236b9640@sovereign> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [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" 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 = rte_eal_get_configuration()->mem_config; > > unsigned int i; > > + int ret; > > const struct internal_config *internal_conf = > > 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 = rte_memseg_contig_walk(malloc_add_seg, NULL); > > + > > + if (ret == 0) > > + malloc_ready = true; > > ...and never knows that malloc is ready. > But malloc is always ready for a secondary process. That is, before returning 0 above for a secondary process malloc_ready should be set unconditionally.