get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 28636,
    "url": "https://patches.dpdk.org/api/patches/28636/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/22990026376b08418cb0eb6f028840c03e89f47f.1505221429.git.echaudro@redhat.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<22990026376b08418cb0eb6f028840c03e89f47f.1505221429.git.echaudro@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/22990026376b08418cb0eb6f028840c03e89f47f.1505221429.git.echaudro@redhat.com",
    "date": "2017-09-12T13:08:44",
    "name": "[dpdk-dev] app/testpmd: adds mlockall() to fix pages",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0e8979e1bedf993fb142236895e5e286ca1ce35f",
    "submitter": {
        "id": 672,
        "url": "https://patches.dpdk.org/api/people/672/?format=api",
        "name": "Eelco Chaudron",
        "email": "echaudro@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/22990026376b08418cb0eb6f028840c03e89f47f.1505221429.git.echaudro@redhat.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/28636/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/28636/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 554522BA4;\n\tTue, 12 Sep 2017 15:08:56 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 8C4722B84\n\tfor <dev@dpdk.org>; Tue, 12 Sep 2017 15:08:55 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id C794581DE9;\n\tTue, 12 Sep 2017 13:08:54 +0000 (UTC)",
            "from rhvm.com (ovpn-116-206.ams2.redhat.com [10.36.116.206])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 2DB3418EE6;\n\tTue, 12 Sep 2017 13:08:54 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com C794581DE9",
        "Authentication-Results": [
            "ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=echaudro@redhat.com"
        ],
        "From": "Eelco Chaudron <echaudro@redhat.com>",
        "To": "jingjing.wu@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Tue, 12 Sep 2017 15:08:44 +0200",
        "Message-Id": "<22990026376b08418cb0eb6f028840c03e89f47f.1505221429.git.echaudro@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.13",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]); Tue, 12 Sep 2017 13:08:54 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH] app/testpmd: adds mlockall() to fix pages",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Call the mlockall() function, to attempt to lock all of its process\nmemory into physical RAM, and preventing the kernel from paging any\nof its memory to disk.\n\nWhen using testpmd for performance testing, depending on the code path\ntaken, we see a couple of page faults in a row. These faults effect\nthe overall drop-rate of testpmd. On Linux the mlockall() call will\nprefault all the pages of testpmd (and the DPDK libraries if linked\ndynamically), even without LD_BIND_NOW.\n\nSigned-off-by: Eelco Chaudron <echaudro@redhat.com>\n---\n app/test-pmd/testpmd.c | 3 +++\n 1 file changed, 3 insertions(+)",
    "diff": "diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 7d4013941..80f3c3e8e 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -38,6 +38,7 @@\n #include <string.h>\n #include <time.h>\n #include <fcntl.h>\n+#include <sys/mman.h>\n #include <sys/types.h>\n #include <errno.h>\n \n@@ -2292,6 +2293,8 @@ main(int argc, char** argv)\n \tsignal(SIGINT, signal_handler);\n \tsignal(SIGTERM, signal_handler);\n \n+\tmlockall(MCL_CURRENT | MCL_FUTURE);\n+\n \tdiag = rte_eal_init(argc, argv);\n \tif (diag < 0)\n \t\trte_panic(\"Cannot init EAL\\n\");\n",
    "prefixes": [
        "dpdk-dev"
    ]
}