get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127187,
    "url": "http://patches.dpdk.org/api/patches/127187/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230523025004.192071-1-kaisenx.you@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": "<20230523025004.192071-1-kaisenx.you@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230523025004.192071-1-kaisenx.you@intel.com",
    "date": "2023-05-23T02:50:04",
    "name": "[v7] enhance NUMA affinity heuristic",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "213f83f69bb3e0f9278348b1874f972b8b28a0be",
    "submitter": {
        "id": 2900,
        "url": "http://patches.dpdk.org/api/people/2900/?format=api",
        "name": "Kaisen You",
        "email": "kaisenx.you@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230523025004.192071-1-kaisenx.you@intel.com/mbox/",
    "series": [
        {
            "id": 28121,
            "url": "http://patches.dpdk.org/api/series/28121/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28121",
            "date": "2023-05-23T02:50:04",
            "name": "[v7] enhance NUMA affinity heuristic",
            "version": 7,
            "mbox": "http://patches.dpdk.org/series/28121/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/127187/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/127187/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 A5FD642B7A;\n\tTue, 23 May 2023 05:07:31 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 40CA540EE5;\n\tTue, 23 May 2023 05:07:31 +0200 (CEST)",
            "from mga06.intel.com (mga06b.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id D827840A80;\n Tue, 23 May 2023 05:07:29 +0200 (CEST)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 May 2023 20:07:28 -0700",
            "from unknown (HELO localhost.localdomain) ([10.239.252.104])\n by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 May 2023 20:07:25 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1684811250; x=1716347250;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=uceCB7pjAANGjCZ5ibTG6Wi8GGcTtCcu4xB3qyLWgHw=;\n b=kQPNP9S0N3vmBhYgpN1+LY8FJByuH5RiwUnIjlTNz7NmxJgv12DrCZ6g\n /VBaeCGsT9G5ZpjFV2CmxU6XHopA08nSO3oH1MwmN6ZRYfite/ck3G4Mc\n BjZ9FWXHtPgURuwXYKLM1Eyom0uD9ke8HAxXLU8MgdFnwPx7O+XoxfbG1\n zMJ2A0dnyHxW6Kq4sVSQ2KaYXB9dlGWrx4QdVjdLdzFZihCKmTJkuKQ8H\n cwPpmA4AdLrVVDTwf5s3sAiUj1kg5Z+Ek8MDtAh8W5LT5iTbcaSrLBIs1\n W2XpqNqF1eqhqrENKRFs6YMJgJPz9jPnC3Tvuexn3pOoqqgMDHVpEwl5Q A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10718\"; a=\"416577126\"",
            "E=Sophos;i=\"6.00,185,1681196400\"; d=\"scan'208\";a=\"416577126\"",
            "E=McAfee;i=\"6600,9927,10718\"; a=\"654191968\"",
            "E=Sophos;i=\"6.00,185,1681196400\"; d=\"scan'208\";a=\"654191968\""
        ],
        "X-ExtLoop1": "1",
        "From": "Kaisen You <kaisenx.you@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "yidingx.zhou@intel.com, thomas@monjalon.net, david.marchand@redhat.com,\n olivier.matz@6wind.com, ferruh.yigit@amd.com, kaisenx.you@intel.com,\n zhoumin@loongson.cn, anatoly.burakov@intel.com, stable@dpdk.org",
        "Subject": "[PATCH v7] enhance NUMA affinity heuristic",
        "Date": "Tue, 23 May 2023 10:50:04 +0800",
        "Message-Id": "<20230523025004.192071-1-kaisenx.you@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230425051649.1109428-1-kaisenx.you@intel.com>",
        "References": "<20230425051649.1109428-1-kaisenx.you@intel.com>",
        "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": "When a DPDK application is started on only one numa node, memory is \nallocated for only one socket. When interrupt threads use memory, \nmemory may not be found on the socket where the interrupt thread \nis currently located, and memory has to be reallocated on the hugepage, \nthis operation will lead to performance degradation.\n\nFixes: 705356f0811f (\"eal: simplify control thread creation\")\nFixes: 770d41bf3309 (\"malloc: fix allocation with unknown socket ID\")\nCc: stable@dpdk.org\n\nSigned-off-by: Kaisen You <kaisenx.you@intel.com>\n---\nChanges since v6:\n- New explanation for easy understanding,\n\nChanges since v5:\n- Add comments to the code,\n\nChanges since v4:\n- mod the patch title,\n\nChanges since v3:\n- add the assignment of socket_id in thread initialization,\n\nChanges since v2:\n- add uncommitted local change and fix compilation,\n\nChanges since v1:\n- accomodate for configurations with main lcore running on multiples\n  physical cores belonging to different numa,\n---\n lib/eal/common/eal_common_thread.c | 6 ++++++\n lib/eal/common/malloc_heap.c       | 9 +++++++++\n 2 files changed, 15 insertions(+)",
    "diff": "diff --git a/lib/eal/common/eal_common_thread.c b/lib/eal/common/eal_common_thread.c\nindex 079a385630..6479b66da1 100644\n--- a/lib/eal/common/eal_common_thread.c\n+++ b/lib/eal/common/eal_common_thread.c\n@@ -252,6 +252,12 @@ static int ctrl_thread_init(void *arg)\n \tstruct rte_thread_ctrl_params *params = arg;\n \n \t__rte_thread_init(rte_lcore_id(), cpuset);\n+\t/* set the value of the per-core variable _socket_id to SOCKET_ID_ANY.\n+\t * Satisfy the judgment condition when threads find memory.\n+\t * If SOCKET_ID_ANY is not specified, the thread may go to a node with\n+\t * unallocated memory in a subsequent memory search.\n+\t */\n+\tRTE_PER_LCORE(_socket_id) = SOCKET_ID_ANY;\n \tparams->ret = rte_thread_set_affinity_by_id(rte_thread_self(), cpuset);\n \tif (params->ret != 0) {\n \t\t__atomic_store_n(&params->ctrl_thread_status,\ndiff --git a/lib/eal/common/malloc_heap.c b/lib/eal/common/malloc_heap.c\nindex d25bdc98f9..6d37f8afee 100644\n--- a/lib/eal/common/malloc_heap.c\n+++ b/lib/eal/common/malloc_heap.c\n@@ -716,6 +716,15 @@ malloc_get_numa_socket(void)\n \t\tif (conf->socket_mem[socket_id] != 0)\n \t\t\treturn socket_id;\n \t}\n+\t/* Trying to allocate memory on the main lcore numa node.\n+\t * especially when the DPDK application is started only on one numa node.\n+\t */\n+\tsocket_id = rte_lcore_to_socket_id(rte_get_main_lcore());\n+\t/* When the socket_id obtained in the main lcore numa is SOCKET_ID_ANY,\n+\t * The probability of finding memory on rte_socket_id_by_idx(0) is higher.\n+\t */\n+\tif (socket_id != (unsigned int)SOCKET_ID_ANY)\n+\t\treturn socket_id;\n \n \treturn rte_socket_id_by_idx(0);\n }\n",
    "prefixes": [
        "v7"
    ]
}