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 2129742974; Tue, 18 Apr 2023 04:48:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A154740EDF; Tue, 18 Apr 2023 04:48:23 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 973BE40E09 for ; Tue, 18 Apr 2023 04:48:21 +0200 (CEST) Received: from dggpeml500017.china.huawei.com (unknown [7.185.36.243]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Q0pCf2TsCzSsyn for ; Tue, 18 Apr 2023 10:44:14 +0800 (CST) Received: from dggpeml500021.china.huawei.com (7.185.36.21) by dggpeml500017.china.huawei.com (7.185.36.243) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 18 Apr 2023 10:48:19 +0800 Received: from dggpeml500021.china.huawei.com ([7.185.36.21]) by dggpeml500021.china.huawei.com ([7.185.36.21]) with mapi id 15.01.2507.023; Tue, 18 Apr 2023 10:48:19 +0800 From: "wuchangsheng (C)" To: "anatoly.burakov@intel.com" CC: "dev@dpdk.org" , "jiangheng (G)" , "Yanan (Euler)" , "Suweifeng (Weifeng, EulerOS)" Subject: [DPDK] heap memory fragmentation issue Thread-Topic: [DPDK] heap memory fragmentation issue Thread-Index: AdltGnbHkADfDfN2S9CgD+rz+TFNnwEhSPfg Date: Tue, 18 Apr 2023 02:48:18 +0000 Message-ID: <448c5b93631a4ef191b57efb10d9424f@huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.136.112.45] Content-Type: multipart/alternative; boundary="_000_448c5b93631a4ef191b57efb10d9424fhuaweicom_" MIME-Version: 1.0 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 --_000_448c5b93631a4ef191b57efb10d9424fhuaweicom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable ping Hello: When using rte_malloc and rte_free to request and release memory repeated= ly, the usage of large pages gradually increases. Checking the relevant source code shows that memory requests and releases a= re started from the head of the freelist chain list of the heap. Memory fra= gmentation seems to result from this, which is considered because the memor= y recently released may be in the cache, and requesting this memory at the = time of allocation may achieve higher performance? How does the community consider the heap's memory fragmentation issue? Is t= here a future plan for memory fragmentation optimization? --_000_448c5b93631a4ef191b57efb10d9424fhuaweicom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

ping

&n= bsp;

&n= bsp;

Hello:

  When using rte_malloc and rte_free to r= equest and release memory repeatedly, the usage of large pages gradually in= creases.

Checking the relevant = source code shows that memory requests and releases are started from the he= ad of the freelist chain list of the heap. Memory fragmentation seems to re= sult from this, which is considered because the memory recently released may be in the cache, and requesting t= his memory at the time of allocation may achieve higher performance?

How does the community= consider the heap's memory fragmentation issue? Is there a future plan for= memory fragmentation optimization?

--_000_448c5b93631a4ef191b57efb10d9424fhuaweicom_--