Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/105143/?format=api
http://patches.dpdk.org/api/patches/105143/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211214151850.1183-1-gaoxiangliu0@163.com/", "project": { "id": 1, "url": "http://patches.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": "<20211214151850.1183-1-gaoxiangliu0@163.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211214151850.1183-1-gaoxiangliu0@163.com", "date": "2021-12-14T15:18:49", "name": "[v3] eal: allow to exclude memseg from core dump", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "96ecc927134c7fe53e110c747f0a5995e503d3cd", "submitter": { "id": 2304, "url": "http://patches.dpdk.org/api/people/2304/?format=api", "name": "Gaoxiang Liu", "email": "gaoxiangliu0@163.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211214151850.1183-1-gaoxiangliu0@163.com/mbox/", "series": [ { "id": 20945, "url": "http://patches.dpdk.org/api/series/20945/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20945", "date": "2021-12-14T15:18:49", "name": "[v3] eal: allow to exclude memseg from core dump", "version": 3, "mbox": "http://patches.dpdk.org/series/20945/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/105143/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/105143/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 46822A034C;\n\tTue, 14 Dec 2021 16:19:15 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B164E40041;\n\tTue, 14 Dec 2021 16:19:14 +0100 (CET)", "from m12-17.163.com (m12-17.163.com [220.181.12.17])\n by mails.dpdk.org (Postfix) with ESMTP id DA0914003C;\n Tue, 14 Dec 2021 16:19:08 +0100 (CET)", "from DESKTOP-ONA2IA7.localdomain (unknown [125.119.22.207])\n by smtp13 (Coremail) with SMTP id EcCowAAnzkLetbhhc0kdCQ--.6737S4;\n Tue, 14 Dec 2021 23:19:01 +0800 (CST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=gpCaB\n /0n4sS513tAi7rrejqOh4M6BeCQ6a9jm+LggN0=; b=O3Lt7khwYf8d0VoJSSllV\n vwTIGTFhCK6nJer4wQvEVvyjTTHnrXhsTd6yUo2W4OOGSUcfHOyE+oT7Xk8icvJ8\n vzvnqcxlEus5LlyKgz6TMrEgCeTl/FD/AhujB63lcmpPJPJZ86RXsThIhgdNqdDF\n YPg/mdwtCQiKXKRmdRQGDQ=", "From": "Gaoxiang Liu <gaoxiangliu0@163.com>", "To": "dev@dpdk.org,\n\tAnatoly Burakov <anatoly.burakov@intel.com>", "Cc": "liugaoxiang@huawei.com, Gaoxiang Liu <gaoxiangliu0@163.com>,\n stable@dpdk.org", "Subject": "[PATCH v3] eal: allow to exclude memseg from core dump", "Date": "Tue, 14 Dec 2021 23:18:49 +0800", "Message-Id": "<20211214151850.1183-1-gaoxiangliu0@163.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20211214120817.1476-1-gaoxiangliu0@163.com>", "References": "<20211214120817.1476-1-gaoxiangliu0@163.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-CM-TRANSID": "EcCowAAnzkLetbhhc0kdCQ--.6737S4", "X-Coremail-Antispam": "1Uf129KBjvJXoWxZF1fArW3KF13Wry3uw13CFg_yoWrAw4xpr\n WDuFyUWry7twsa9r9rJw40vF4rKF93CF17Ga47Xw1kZrZrt3y3XF98K34akasxZryUAF4D\n Zr4UWFWY9a47J3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07Uc_-PUUUUU=", "X-Originating-IP": "[125.119.22.207]", "X-CM-SenderInfo": "xjdr5xxdqjzxjxq6il2tof0z/xtbBQgZpOl++OUYLMAAAsy", "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": "Some DPDK application is allocated storage partition of 8G(or smaller)\nIf coredump happens, the application doesn't work because of\ninsufficient storage space.\nThe patch provides a config that means whether the memseg memory\nis allowed to exclude from core dump.\nThe DPDK application can choose to open it according to the actual\nsituation.\n\nFixes: d72e4042c5eb (\"mem: exclude unused memory from core dump\")\nCc: stable@dpdk.org\n\nSigned-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>\n\n---\nv2:\n* Fixed compile issues.\n\nv3:\n* Fixed review issues. madvise is replaced by eal_mem_set_dump(),\n* and The type of huge_dont_dump_flag has been changed to bool.\n---\n doc/guides/linux_gsg/linux_eal_parameters.rst | 4 ++++\n lib/eal/common/eal_internal_cfg.h | 1 +\n lib/eal/common/eal_options.h | 3 ++-\n lib/eal/linux/eal.c | 4 ++++\n lib/eal/linux/eal_memalloc.c | 3 +++\n lib/eal/unix/eal_unix_memory.c | 7 +++++--\n 6 files changed, 19 insertions(+), 3 deletions(-)", "diff": "diff --git a/doc/guides/linux_gsg/linux_eal_parameters.rst b/doc/guides/linux_gsg/linux_eal_parameters.rst\nindex 74df2611b5..b6805bc6df 100644\n--- a/doc/guides/linux_gsg/linux_eal_parameters.rst\n+++ b/doc/guides/linux_gsg/linux_eal_parameters.rst\n@@ -93,6 +93,10 @@ Memory-related options\n \n Free hugepages back to system exactly as they were originally allocated.\n \n+* ``--memseg-dont-dump``\n+\n+ Allow to exclude memseg from core dump.\n+\n Other options\n ~~~~~~~~~~~~~\n \ndiff --git a/lib/eal/common/eal_internal_cfg.h b/lib/eal/common/eal_internal_cfg.h\nindex d6c0470eb8..a7c34b88db 100644\n--- a/lib/eal/common/eal_internal_cfg.h\n+++ b/lib/eal/common/eal_internal_cfg.h\n@@ -87,6 +87,7 @@ struct internal_config {\n \t\t\t/**< user defined mbuf pool ops name */\n \tunsigned num_hugepage_sizes; /**< how many sizes on this system */\n \tstruct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES];\n+\tbool memseg_dont_dump_flag;\n \tenum rte_iova_mode iova_mode ; /**< Set IOVA mode on this system */\n \trte_cpuset_t ctrl_cpuset; /**< cpuset for ctrl threads */\n \tvolatile unsigned int init_complete;\ndiff --git a/lib/eal/common/eal_options.h b/lib/eal/common/eal_options.h\nindex 8e4f7202a2..013aad4cfc 100644\n--- a/lib/eal/common/eal_options.h\n+++ b/lib/eal/common/eal_options.h\n@@ -87,7 +87,8 @@ enum {\n \tOPT_NO_TELEMETRY_NUM,\n #define OPT_FORCE_MAX_SIMD_BITWIDTH \"force-max-simd-bitwidth\"\n \tOPT_FORCE_MAX_SIMD_BITWIDTH_NUM,\n-\n+#define OPT_MEMSEG_DONT_DUMP \"memseg-dont-dump\"\n+\tOPT_MEMSEG_DONT_DUMP_NUM,\n \tOPT_LONG_MAX_NUM\n };\n \ndiff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex 60b4924838..8a47bf758a 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -817,6 +817,10 @@ eal_parse_args(int argc, char **argv)\n \t\t\tinternal_conf->match_allocations = 1;\n \t\t\tbreak;\n \n+\t\tcase OPT_MEMSEG_DONT_DUMP_NUM:\n+\t\t\tinternal_conf->memseg_dont_dump_flag = 1;\n+\t\t\tbreak;\n+\n \t\tdefault:\n \t\t\tif (opt < OPT_LONG_MIN_NUM && isprint(opt)) {\n \t\t\t\tRTE_LOG(ERR, EAL, \"Option %c is not supported \"\ndiff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c\nindex 337f2bc739..8e41537355 100644\n--- a/lib/eal/linux/eal_memalloc.c\n+++ b/lib/eal/linux/eal_memalloc.c\n@@ -663,6 +663,9 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,\n \tms->iova = iova;\n \tms->socket_id = socket_id;\n \n+\tif (internal_conf->memseg_dont_dump_flag)\n+\t\teal_mem_set_dump(addr, alloc_sz, false);\n+\n \treturn 0;\n \n mapped:\ndiff --git a/lib/eal/unix/eal_unix_memory.c b/lib/eal/unix/eal_unix_memory.c\nindex 68ae93bd6e..44227aee95 100644\n--- a/lib/eal/unix/eal_unix_memory.c\n+++ b/lib/eal/unix/eal_unix_memory.c\n@@ -83,10 +83,13 @@ eal_mem_set_dump(void *virt, size_t size, bool dump)\n \tint flags = dump ? EAL_DODUMP : EAL_DONTDUMP;\n \tint ret = madvise(virt, size, flags);\n \tif (ret) {\n-\t\tRTE_LOG(DEBUG, EAL, \"madvise(%p, %#zx, %d) failed: %s\\n\",\n+\t\tRTE_LOG(INFO, EAL, \"madvise(%p, %#zx, %d) failed: %s\\n\",\n \t\t\t\tvirt, size, flags, strerror(rte_errno));\n \t\trte_errno = errno;\n-\t}\n+\t} else\n+\t\tRTE_LOG(INFO, EAL, \"madvise(%p, %#zx, %d) success: %s\\n\",\n+\t\t\t\tvirt, size, flags, __func__);\n+\n \treturn ret;\n }\n \n", "prefixes": [ "v3" ] }{ "id": 105143, "url": "