get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43049,
    "url": "http://patches.dpdk.org/api/patches/43049/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/f44cfb9a672b4d1e1106cd0ec1695bd73f7e7037.1531485955.git.anatoly.burakov@intel.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": "<f44cfb9a672b4d1e1106cd0ec1695bd73f7e7037.1531485955.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/f44cfb9a672b4d1e1106cd0ec1695bd73f7e7037.1531485955.git.anatoly.burakov@intel.com",
    "date": "2018-07-13T12:48:02",
    "name": "[v3,6/8] mem: add support for hugepage-unlink mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a2bf830b1d7bd807275c7a125d64c75b682c8abf",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/f44cfb9a672b4d1e1106cd0ec1695bd73f7e7037.1531485955.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 564,
            "url": "http://patches.dpdk.org/api/series/564/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=564",
            "date": "2018-07-13T12:47:56",
            "name": "Support running DPDK without hugetlbfs mountpoint",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/564/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43049/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43049/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 49F594CBB;\n\tFri, 13 Jul 2018 14:48:24 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 1F97D2C2F\n\tfor <dev@dpdk.org>; Fri, 13 Jul 2018 14:48:12 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Jul 2018 05:48:12 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby FMSMGA003.fm.intel.com with ESMTP; 13 Jul 2018 05:48:05 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tw6DCm5Oo016845; Fri, 13 Jul 2018 13:48:05 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w6DCm5xa006278;\n\tFri, 13 Jul 2018 13:48:05 +0100",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w6DCm4vq006274;\n\tFri, 13 Jul 2018 13:48:04 +0100"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,347,1526367600\"; d=\"scan'208\";a=\"64448452\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "ray.kinsella@intel.com, kuralamudhan.ramakrishnan@intel.com,\n\tlouise.m.daly@intel.com, bruce.richardson@intel.com,\n\tferruh.yigit@intel.com, konstantin.ananyev@intel.com, thomas@monjalon.net",
        "Date": "Fri, 13 Jul 2018 13:48:02 +0100",
        "Message-Id": "<f44cfb9a672b4d1e1106cd0ec1695bd73f7e7037.1531485955.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1531485955.git.anatoly.burakov@intel.com>",
            "<cover.1531485955.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1531485955.git.anatoly.burakov@intel.com>",
            "<cover.1531477505.git.anatoly.burakov@intel.com>\n\t<cover.1531485955.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v3 6/8] mem: add support for hugepage-unlink mode",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Unlink hugepages after creating them, to honor the hugepage-unlink mode.\nWe cannot resize non-existing files, so make single file segments\nexplicitly unsupported.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n\nNotes:\n    v1->v2:\n    - Move check for hugepage unlink into this patch, to be\n      consistent with commit message\n    \n    RFC->v1:\n    - Use --huge-unlink only\n    \n    RFC->v1:\n    - Use --huge-unlink only\n\n lib/librte_eal/common/eal_common_options.c |  6 ++++++\n lib/librte_eal/linuxapp/eal/eal_memalloc.c | 16 +++++++++++++++-\n 2 files changed, 21 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex 45ea01a8b..df5d53648 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -1332,6 +1332,12 @@ eal_check_common_options(struct internal_config *internal_cfg)\n \t\t\t\" is only supported in non-legacy memory mode\\n\");\n \t\treturn -1;\n \t}\n+\tif (internal_cfg->single_file_segments &&\n+\t\t\tinternal_cfg->hugepage_unlink) {\n+\t\tRTE_LOG(ERR, EAL, \"Option --\"OPT_SINGLE_FILE_SEGMENTS\" is \"\n+\t\t\t\"not compatible with --\"OPT_HUGE_UNLINK\"\\n\");\n+\t\treturn -1;\n+\t}\n \n \treturn 0;\n }\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c\nindex 69604f823..d610923b8 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c\n@@ -489,6 +489,13 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,\n \t\t\t\t__func__, strerror(errno));\n \t\t\tgoto resized;\n \t\t}\n+\t\tif (internal_config.hugepage_unlink) {\n+\t\t\tif (unlink(path)) {\n+\t\t\t\tRTE_LOG(DEBUG, EAL, \"%s(): unlink() failed: %s\\n\",\n+\t\t\t\t\t__func__, strerror(errno));\n+\t\t\t\tgoto resized;\n+\t\t\t}\n+\t\t}\n \t}\n \n \t/*\n@@ -587,7 +594,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,\n \t\t/* ignore failure, can't make it any worse */\n \t} else {\n \t\t/* only remove file if we can take out a write lock */\n-\t\tif (lock(fd, LOCK_EX) == 1)\n+\t\tif (internal_config.hugepage_unlink == 0 &&\n+\t\t\t\tlock(fd, LOCK_EX) == 1)\n \t\t\tunlink(path);\n \t\tclose(fd);\n \t}\n@@ -612,6 +620,12 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,\n \t\treturn -1;\n \t}\n \n+\t/* if we've already unlinked the page, nothing needs to be done */\n+\tif (internal_config.hugepage_unlink) {\n+\t\tmemset(ms, 0, sizeof(*ms));\n+\t\treturn 0;\n+\t}\n+\n \t/* if we are not in single file segments mode, we're going to unmap the\n \t * segment and thus drop the lock on original fd, but hugepage dir is\n \t * now locked so we can take out another one without races.\n",
    "prefixes": [
        "v3",
        "6/8"
    ]
}