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 499384239A; Tue, 10 Jan 2023 03:21:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E781D40689; Tue, 10 Jan 2023 03:21:20 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id 2C51F40150 for ; Tue, 10 Jan 2023 03:21:19 +0100 (CET) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NrZDs4lkXzqV1r; Tue, 10 Jan 2023 10:16:29 +0800 (CST) Received: from [10.67.103.235] (10.67.103.235) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 10 Jan 2023 10:21:14 +0800 Subject: Re: [PATCH v11 0/6] introduce memarea library To: Chengwen Feng , , , , , , References: <20220721044648.6817-1-fengchengwen@huawei.com> <20221213091358.49237-1-fengchengwen@huawei.com> CC: , From: Dongdong Liu Message-ID: Date: Tue, 10 Jan 2023 10:21:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20221213091358.49237-1-fengchengwen@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.235] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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 Hi Chengwen Except for a minor comments, this patchset looks good to me. Reviewed-by: Dongdong Liu Thanks, Dongdong On 2022/12/13 17:13, Chengwen Feng wrote: > The memarea library is an allocator of variable-size object which based > on a memory region. The main features are as follows: > > - The memory region can be initialized from the following memory > sources: > 1. HEAP: e.g. invoke rte_malloc_socket. > 2. LIBC: e.g. invoke posix_memalign. > 3. Another memarea: it can be from another memarea. > > - It provides refcnt feature which could be useful in multi-reader > scenario. > > - It supports MT-safe as long as it's specified at creation time. > > Note: > a) The memarea is oriented towards the application layer, which could > provides 'region-based memory management' [1] function. > b) The eal library also provide memory zone/heap management, but these > are tied to huge pages management. > > [1] https://en.wikipedia.org/wiki/Region-based_memory_management > > Signed-off-by: Chengwen Feng > > Chengwen Feng (6): > memarea: introduce memarea library > test/memarea: support memarea test > memarea: support alloc/free/refcnt-update API > test/memarea: support alloc/free/refcnt-update test > memarea: support dump API > test/memarea: support dump test > > --- > v11: > * rebase 23.03 > * remove "app/test: add memarea to malloc-perf-autotest" because the > two algorithm are not comparable which also address previous > comments. > v10: > * support windows platform. > * add rte_memarea.libc perftest to malloc-perf-autotest. > v9: > * address Dmitry's comments. > * drop features of SOURCE_USER and backup memarea mechanism. > * rename rte_memarea_update_refcnt to rte_memarea_refcnt_update > to keep with rte_mbuf_refcnt_update name style. > * fix memarea perftest compile failed at windows platform. > * fix spell warning. > v8: > * address Mattias's comments (rename ALG_DEFAULT with ALG_NEXTFIT). > * small feature patches are combined. > * enhanced backup memory mechanism. > * add memarea to malloc-perf-autotest. > * other tiny naming optimize. > v7: > * repost patches as there are spread over different series in patchwork. > v6: > * address Mattias's comments. > v5: > * fix 09/10 patch spell warning. > v4: > * repost patches as there are spread over different series in patchwork. > v3: > * add memory source of RTE memory. > * add algorithm field to facilitate the introduction of new algorithms. > * fix memarea log don't output problem. > v2: > * fix compile issues reported by dpdk-test-report. > * address Dimitry and Jerin's comments. > * add no MT-safe test. > > MAINTAINERS | 6 + > app/test/meson.build | 2 + > app/test/test_memarea.c | 308 ++++++++++++++++++ > doc/api/doxy-api-index.md | 3 +- > doc/api/doxy-api.conf.in | 1 + > doc/guides/prog_guide/index.rst | 1 + > doc/guides/prog_guide/memarea_lib.rst | 52 ++++ > doc/guides/rel_notes/release_23_03.rst | 5 + > lib/eal/common/eal_common_log.c | 1 + > lib/eal/include/rte_log.h | 1 + > lib/memarea/memarea_private.h | 36 +++ > lib/memarea/meson.build | 10 + > lib/memarea/rte_memarea.c | 413 +++++++++++++++++++++++++ > lib/memarea/rte_memarea.h | 219 +++++++++++++ > lib/memarea/version.map | 16 + > lib/meson.build | 1 + > 16 files changed, 1074 insertions(+), 1 deletion(-) > create mode 100644 app/test/test_memarea.c > create mode 100644 doc/guides/prog_guide/memarea_lib.rst > create mode 100644 lib/memarea/memarea_private.h > create mode 100644 lib/memarea/meson.build > create mode 100644 lib/memarea/rte_memarea.c > create mode 100644 lib/memarea/rte_memarea.h > create mode 100644 lib/memarea/version.map >