get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/105127/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 105127,
    "url": "http://patches.dpdk.org/api/patches/105127/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211214114151.1298-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": "<20211214114151.1298-1-gaoxiangliu0@163.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211214114151.1298-1-gaoxiangliu0@163.com",
    "date": "2021-12-14T11:41:50",
    "name": "mem: exclude used memory from core dump by config",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "222e9a4d1977884a75b66e7f0b6e1b8469a3a36b",
    "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/20211214114151.1298-1-gaoxiangliu0@163.com/mbox/",
    "series": [
        {
            "id": 20941,
            "url": "http://patches.dpdk.org/api/series/20941/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=20941",
            "date": "2021-12-14T11:41:50",
            "name": "mem: exclude used memory from core dump by config",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/20941/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/105127/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/105127/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 93BD0A00C3;\n\tTue, 14 Dec 2021 12:42:21 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 11C4140041;\n\tTue, 14 Dec 2021 12:42:21 +0100 (CET)",
            "from m12-13.163.com (m12-13.163.com [220.181.12.13])\n by mails.dpdk.org (Postfix) with ESMTP id BDCB84003C;\n Tue, 14 Dec 2021 12:42:14 +0100 (CET)",
            "from DESKTOP-ONA2IA7.localdomain (unknown [223.104.244.167])\n by smtp9 (Coremail) with SMTP id DcCowABn8RsBg7hhUgBVBA--.40437S4;\n Tue, 14 Dec 2021 19:42:03 +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=efW5k\n LnrIekO7S26rkr3EjHiBMkyZBsW3h4/HxRu/E8=; b=aNfgfqpR1XXbDbvBBPgTn\n sILxVQrJY3EJrPvQFJc5hP6yXezsNOm+WLr3p7X2jp3v66Aw+FEVszv5OoP2Zk5S\n QS4UMju2foD7qe+fM04x/PSNAsIT2iDDSA7L+CYgtJd41UgoJrjTvQ/tiGTsnYTH\n 7gmRdLJs4UYmsPn/a3YwgY=",
        "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] mem: exclude used memory from core dump by config",
        "Date": "Tue, 14 Dec 2021 19:41:50 +0800",
        "Message-Id": "<20211214114151.1298-1-gaoxiangliu0@163.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "DcCowABn8RsBg7hhUgBVBA--.40437S4",
        "X-Coremail-Antispam": "1Uf129KBjvJXoWxZF1DWr43XFWxAF48ZrWfuFg_yoW5AFWUpF\n W7CFy5XF1xtr1S93srWw4vva1rKas3GF1UGay7Xw1qvrZxtayfW34DK343Ka43ZFWUJF4D\n ur10gFZ09a4UAw7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zR7kucUUUUU=",
        "X-Originating-IP": "[223.104.244.167]",
        "X-CM-SenderInfo": "xjdr5xxdqjzxjxq6il2tof0z/xtbBQgtpOl++OUN7zAAAs2",
        "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 allolcateed 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 huge used memory\nneeds to be not dumped in 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 lib/eal/common/eal_internal_cfg.h |  1 +\n lib/eal/common/eal_options.h      |  3 ++-\n lib/eal/linux/eal.c               |  3 +++\n lib/eal/linux/eal_memalloc.c      | 10 ++++++++++\n 4 files changed, 16 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/eal/common/eal_internal_cfg.h b/lib/eal/common/eal_internal_cfg.h\nindex d6c0470eb8..f9cd300f86 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+\tvolatile unsigned huge_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..6b9a24f0f9 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_HUGE_DONT_DUMP     \"huge-dont-dump\"\n+\tOPT_HUGE_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..eeab5e4f3d 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -816,6 +816,9 @@ eal_parse_args(int argc, char **argv)\n \t\tcase OPT_MATCH_ALLOCATIONS_NUM:\n \t\t\tinternal_conf->match_allocations = 1;\n \t\t\tbreak;\n+\t\tcase OPT_HUGE_DONT_DUMP_NUM:\n+\t\t\tinternal_config->huge_dont_dump_flag = 1;\n+\t\t\tbreak;\n \n \t\tdefault:\n \t\t\tif (opt < OPT_LONG_MIN_NUM && isprint(opt)) {\ndiff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c\nindex 337f2bc739..13ca1cf58c 100644\n--- a/lib/eal/linux/eal_memalloc.c\n+++ b/lib/eal/linux/eal_memalloc.c\n@@ -663,6 +663,16 @@ 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_config->huge_dont_dump_flag) {\n+\t\tif (madvise(addr, alloc_sz, EAL_DONTDUMP)) {\n+\t\t\tRTE_LOG(INFO, EAL, \"madvise(%p, %#zx, %d) failed: %s\\n\",\n+\t\t\t\t\tvirt, size, flags, strerror(rte_errno));\n+\t\t} else {\n+\t\t\tRTE_LOG(INFO, EAL, \"%s(): madvise(MADV_DONTDUMP) memory success.(len=%zu)\\n\",\n+\t\t\t\t\t__func__, alloc_sz);\n+\t\t}\n+\t}\n+\n \treturn 0;\n \n mapped:\n",
    "prefixes": []
}