get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87817,
    "url": "http://patches.dpdk.org/api/patches/87817/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1612776481-151396-1-git-send-email-matan@nvidia.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": "<1612776481-151396-1-git-send-email-matan@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1612776481-151396-1-git-send-email-matan@nvidia.com",
    "date": "2021-02-08T09:28:01",
    "name": "vdpa/mlx5: fix polling threads scheduling",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e8ba4d806a552b3eec9b0c4d8d721c5f94d7465d",
    "submitter": {
        "id": 1911,
        "url": "http://patches.dpdk.org/api/people/1911/?format=api",
        "name": "Matan Azrad",
        "email": "matan@nvidia.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1612776481-151396-1-git-send-email-matan@nvidia.com/mbox/",
    "series": [
        {
            "id": 15205,
            "url": "http://patches.dpdk.org/api/series/15205/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=15205",
            "date": "2021-02-08T09:28:01",
            "name": "vdpa/mlx5: fix polling threads scheduling",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/15205/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/87817/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/87817/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 C2DA8A0547;\n\tMon,  8 Feb 2021 10:28:12 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3E9DC40693;\n\tMon,  8 Feb 2021 10:28:12 +0100 (CET)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by mails.dpdk.org (Postfix) with ESMTP id 0024E40147\n for <dev@dpdk.org>; Mon,  8 Feb 2021 10:28:09 +0100 (CET)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n matan@nvidia.com) with SMTP; 8 Feb 2021 11:28:05 +0200",
            "from pegasus25.mtr.labs.mlnx. (pegasus25.mtr.labs.mlnx\n [10.210.16.10])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 1189S55Z010719;\n Mon, 8 Feb 2021 11:28:05 +0200"
        ],
        "From": "Matan Azrad <matan@nvidia.com>",
        "To": "dev@dpdk.org",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Date": "Mon,  8 Feb 2021 09:28:01 +0000",
        "Message-Id": "<1612776481-151396-1-git-send-email-matan@nvidia.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Subject": "[dpdk-dev] [PATCH] vdpa/mlx5: fix polling threads scheduling",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When the event mode is with 0 fixed delay, the polling-thread will never\ngive-up CPU.\n\nSo, when multi-polling-threads are active, the context-switch between\nthem will be managed by the system which may affect latency according to\nthe time-out decided by the system.\n\nIn order to fix multi-devices polling thread scheduling, this patch\nforces rescheduling for each CQ poll iteration.\n\nMove the polling thread to SCHED_RR mode with maximum priority to\ncomplete the fairness.\n\nFixes: 6956a48cabbb (\"vdpa/mlx5: set polling mode default delay to zero\")\n\nSigned-off-by: Matan Azrad <matan@nvidia.com>\n---\n drivers/vdpa/mlx5/mlx5_vdpa_event.c | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)",
    "diff": "diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c\nindex 0f635ff..86adc86 100644\n--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c\n+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c\n@@ -232,6 +232,9 @@\n \t}\n \tif (priv->timer_delay_us)\n \t\tusleep(priv->timer_delay_us);\n+\telse\n+\t\t/* Give-up CPU to improve polling threads scheduling. */\n+\t\tpthread_yield();\n }\n \n static void *\n@@ -500,6 +503,9 @@\n \trte_cpuset_t cpuset;\n \tpthread_attr_t attr;\n \tchar name[16];\n+\tconst struct sched_param sp = {\n+\t\t.sched_priority = sched_get_priority_max(SCHED_RR),\n+\t};\n \n \tif (!priv->eventc)\n \t\t/* All virtqs are in poll mode. */\n@@ -520,6 +526,16 @@\n \t\t\tDRV_LOG(ERR, \"Failed to set thread affinity.\");\n \t\t\treturn -1;\n \t\t}\n+\t\tret = pthread_attr_setschedpolicy(&attr, SCHED_RR);\n+\t\tif (ret) {\n+\t\t\tDRV_LOG(ERR, \"Failed to set thread sched policy = RR.\");\n+\t\t\treturn -1;\n+\t\t}\n+\t\tret = pthread_attr_setschedparam(&attr, &sp);\n+\t\tif (ret) {\n+\t\t\tDRV_LOG(ERR, \"Failed to set thread priority.\");\n+\t\t\treturn -1;\n+\t\t}\n \t\tret = pthread_create(&priv->timer_tid, &attr,\n \t\t\t\t     mlx5_vdpa_poll_handle, (void *)priv);\n \t\tif (ret) {\n",
    "prefixes": []
}