Show a patch.

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

{
    "id": 74571,
    "url": "https://patches.dpdk.org/api/patches/74571/",
    "web_url": "https://patches.dpdk.org/patch/74571/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1595333018-7119-1-git-send-email-michaelba@mellanox.com>",
    "date": "2020-07-21T12:03:38",
    "name": "net/mlx5: optimize critical section in device free",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0c1cfdd9cde8bf9f829f0f957289d2ef7c1a5113",
    "submitter": {
        "id": 1582,
        "url": "https://patches.dpdk.org/api/people/1582/",
        "name": "Michael Baum",
        "email": "michaelba@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "https://patches.dpdk.org/api/users/3268/",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@mellanox.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74571/mbox/",
    "series": [
        {
            "id": 11208,
            "url": "https://patches.dpdk.org/api/series/11208/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11208",
            "date": "2020-07-21T12:03:38",
            "name": "net/mlx5: optimize critical section in device free",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/11208/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74571/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74571/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH] net/mlx5: optimize critical section in device\n\tfree",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Michael Baum <michaelba@mellanox.com>",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 0BEE9A0526;\n\tTue, 21 Jul 2020 14:03:47 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E1F951BFF9;\n\tTue, 21 Jul 2020 14:03:46 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id EC6761BFEF\n for <dev@dpdk.org>; Tue, 21 Jul 2020 14:03:44 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n matan@mellanox.com) with SMTP; 21 Jul 2020 15:03:41 +0300",
            "from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx\n [10.210.16.112])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06LC3f0l025801;\n Tue, 21 Jul 2020 15:03:41 +0300"
        ],
        "To": "dev@dpdk.org",
        "X-Mailer": "git-send-email 1.8.3.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Tue, 21 Jul 2020 12:03:38 +0000",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Errors-To": "dev-bounces@dpdk.org",
        "Cc": "matan@mellanox.com, viacheslavo@mellanox.com",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Message-Id": "<1595333018-7119-1-git-send-email-michaelba@mellanox.com>",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "When PMD releases shared IB device context, It locks the\nmlx5_ibv_list_mutex lock throughout the function so that it does not\nhappen while removing a device from the list, another process will try\nto insert another device into it.\nOn the other hand, having removed the device from the list even if it\nhas not yet released all of its resources, it should not care about\nother processes and can release the lock.\n\nHowever, the PMD does not release the lock even though it can, and\nperforms a number of operations, some of which include sleep and may be\nlong.\nTo improve this, shorten the lock time to the minimum necessary.\n\nSigned-off-by: Michael Baum <michaelba@mellanox.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/net/mlx5/mlx5.c | 2 ++\n 1 file changed, 2 insertions(+)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex 846398d..70338e5 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -939,6 +939,7 @@ struct mlx5_dev_ctx_shared *\n \tmlx5_mr_release_cache(&sh->share_cache);\n \t/* Remove context from the global device list. */\n \tLIST_REMOVE(sh, next);\n+\tpthread_mutex_unlock(&mlx5_dev_ctx_list_mutex);\n \t/*\n \t *  Ensure there is no async event handler installed.\n \t *  Only primary process handles async device events.\n@@ -968,6 +969,7 @@ struct mlx5_dev_ctx_shared *\n \t\tmlx5_flow_id_pool_release(sh->flow_id_pool);\n \tpthread_mutex_destroy(&sh->txpp.mutex);\n \tmlx5_free(sh);\n+\treturn;\n exit:\n \tpthread_mutex_unlock(&mlx5_dev_ctx_list_mutex);\n }\n",
    "prefixes": []
}