Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/130318/?format=api
http://patchwork.dpdk.org/api/patches/130318/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230815031307.1299726-6-okaya@kernel.org/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20230815031307.1299726-6-okaya@kernel.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20230815031307.1299726-6-okaya@kernel.org", "date": "2023-08-15T03:13:05", "name": "[v2,5/7] eal_memory: skip initialization", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "aaa6559c3bc59de6ca5d9c676ee33e4e36f5c5c8", "submitter": { "id": 2903, "url": "http://patchwork.dpdk.org/api/people/2903/?format=api", "name": "Sinan Kaya", "email": "okaya@kernel.org" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230815031307.1299726-6-okaya@kernel.org/mbox/", "series": [ { "id": 29224, "url": "http://patchwork.dpdk.org/api/series/29224/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29224", "date": "2023-08-15T03:13:00", "name": "support reinit flow", "version": 2, "mbox": "http://patchwork.dpdk.org/series/29224/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/130318/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/130318/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 499A743069;\n\tTue, 15 Aug 2023 05:13:40 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CEB5A43273;\n\tTue, 15 Aug 2023 05:13:19 +0200 (CEST)", "from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217])\n by mails.dpdk.org (Postfix) with ESMTP id D6BD343260\n for <dev@dpdk.org>; Tue, 15 Aug 2023 05:13:15 +0200 (CEST)", "from smtp.kernel.org (relay.kernel.org [52.25.139.140])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits))\n (No client certificate requested)\n by dfw.source.kernel.org (Postfix) with ESMTPS id 3F2F562FA4;\n Tue, 15 Aug 2023 03:13:15 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 4E3C1C433C9;\n Tue, 15 Aug 2023 03:13:14 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n s=k20201202; t=1692069194;\n bh=LbXbA/fAi7x5JwHXeQ1RzO/syYieIVZwl7zLLfuk3WU=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=j5WNriBHV9hhN+cTkqzC4isdo+vDXwKMIMVQD7QJ6fp+MSeFwbmNTXDJMl2imOd3F\n x35qE8udBBdmQgJk4wMIv/tBd8fu/Kdo6v5jHKt6S1eo1FmLohnpJ5PvOrojrINofv\n xpzDK/lFc/lvFLsZYGNSefOvOCgigdMJQmSXFL7792zusZ7eJ5E/c9zWF4Z2HMoY7n\n hP/gj+k0IAVWUza7HtLt2xxPjvazAXLl9tUYw31amEPGXO4+YRVWMWuYAZK/FoUf8d\n Jo4Z+etRea/lKXauITOVPA+2SDiELyAh+ihi8/P0ishY9cOhnxQzdp9b7RQzuGd6IW\n 9NOr/GneZwzFQ==", "From": "okaya@kernel.org", "To": "Anatoly Burakov <anatoly.burakov@intel.com>", "Cc": "dev@dpdk.org,\n\tSinan Kaya <okaya@kernel.org>", "Subject": "[PATCH v2 5/7] eal_memory: skip initialization", "Date": "Mon, 14 Aug 2023 23:13:05 -0400", "Message-Id": "<20230815031307.1299726-6-okaya@kernel.org>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20230815031307.1299726-1-okaya@kernel.org>", "References": "<20230815031307.1299726-1-okaya@kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "From: Sinan Kaya <okaya@kernel.org>\n\nInitialize heap area just once.\n\nSigned-off-by: Sinan Kaya <okaya@kernel.org>\n---\n lib/eal/common/eal_common_memory.c | 5 +++++\n lib/eal/common/malloc_heap.c | 7 +++++++\n 2 files changed, 12 insertions(+)", "diff": "diff --git a/lib/eal/common/eal_common_memory.c b/lib/eal/common/eal_common_memory.c\nindex 688dc615d7..b6fcc293be 100644\n--- a/lib/eal/common/eal_common_memory.c\n+++ b/lib/eal/common/eal_common_memory.c\n@@ -39,6 +39,7 @@\n \n static void *next_baseaddr;\n static uint64_t system_page_sz;\n+static bool memory_initialized;\n \n #define MAX_MMAP_WITH_DEFINED_ADDR_TRIES 5\n void *\n@@ -1088,6 +1089,9 @@ rte_eal_memory_init(void)\n \tif (!mcfg)\n \t\treturn -1;\n \n+\tif (memory_initialized)\n+\t\treturn 0;\n+\n \t/* lock mem hotplug here, to prevent races while we init */\n \trte_mcfg_mem_read_lock();\n \n@@ -1106,6 +1110,7 @@ rte_eal_memory_init(void)\n \tif (internal_conf->no_shconf == 0 && rte_eal_memdevice_init() < 0)\n \t\tgoto fail;\n \n+\tmemory_initialized = true;\n \treturn 0;\n fail:\n \trte_mcfg_mem_read_unlock();\ndiff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c\nindex 6eb6fcda5e..facc16a802 100644\n--- a/lib/eal/common/malloc_heap.c\n+++ b/lib/eal/common/malloc_heap.c\n@@ -31,6 +31,8 @@\n #define CONST_MAX(a, b) (a > b ? a : b) /* RTE_MAX is not a constant */\n #define EXTERNAL_HEAP_MIN_SOCKET_ID (CONST_MAX((1 << 8), RTE_MAX_NUMA_NODES))\n \n+static bool heap_initialized;\n+\n static unsigned\n check_hugepage_sz(unsigned flags, uint64_t hugepage_sz)\n {\n@@ -1406,6 +1408,9 @@ rte_eal_malloc_heap_init(void)\n \tconst struct internal_config *internal_conf =\n \t\teal_get_internal_configuration();\n \n+\tif (heap_initialized)\n+\t\treturn 0;\n+\n \tif (internal_conf->match_allocations)\n \t\tRTE_LOG(DEBUG, EAL, \"Hugepages will be freed exactly as allocated.\\n\");\n \n@@ -1443,6 +1448,8 @@ rte_eal_malloc_heap_init(void)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\theap_initialized = true;\n+\n \t/* add all IOVA-contiguous areas to the heap */\n \treturn rte_memseg_contig_walk(malloc_add_seg, NULL);\n }\n", "prefixes": [ "v2", "5/7" ] }{ "id": 130318, "url": "