get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1525724,
    "url": "http://patchwork.ozlabs.org/api/patches/1525724/",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/d7b210c055238a39349ee67500fea1bc2aa6e353.1631094144.git.grive@u256.net/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<d7b210c055238a39349ee67500fea1bc2aa6e353.1631094144.git.grive@u256.net>",
    "list_archive_url": null,
    "date": "2021-09-08T09:47:39",
    "name": "[ovs-dev,v5,15/27] dpif-netdev: Quiesce offload thread periodically",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "56b4d7de91daecc4beec55132e63558056de4229",
    "submitter": {
        "id": 78795,
        "url": "http://patchwork.ozlabs.org/api/people/78795/",
        "name": "Gaëtan Rivet",
        "email": "grive@u256.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/d7b210c055238a39349ee67500fea1bc2aa6e353.1631094144.git.grive@u256.net/mbox/",
    "series": [
        {
            "id": 261424,
            "url": "http://patchwork.ozlabs.org/api/series/261424/",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=261424",
            "date": "2021-09-08T09:47:24",
            "name": "dpif-netdev: Parallel offload processing",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/261424/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1525724/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/1525724/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "ovs-dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=u256.net header.i=@u256.net header.a=rsa-sha256\n header.s=fm2 header.b=nHyE+gL+;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=messagingengine.com header.i=@messagingengine.com\n header.a=rsa-sha256 header.s=fm3 header.b=CXBqOBFa;\n\tdkim-atps=neutral",
            "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>)",
            "smtp3.osuosl.org (amavisd-new);\n dkim=pass (2048-bit key) header.d=u256.net header.b=\"nHyE+gL+\";\n dkim=pass (2048-bit key) header.d=messagingengine.com\n header.b=\"CXBqOBFa\""
        ],
        "Received": [
            "from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4H4HR65CN7z9sW8\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  8 Sep 2021 19:49:22 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 2E51683F20;\n\tWed,  8 Sep 2021 09:49:20 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n\tby localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id D2Wua06rXpOa; Wed,  8 Sep 2021 09:49:18 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id CEDF683E89;\n\tWed,  8 Sep 2021 09:49:09 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 5F9A3C0020;\n\tWed,  8 Sep 2021 09:49:09 +0000 (UTC)",
            "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 34722C000D\n for <ovs-dev@openvswitch.org>; Wed,  8 Sep 2021 09:49:08 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 52A4B6075D\n for <ovs-dev@openvswitch.org>; Wed,  8 Sep 2021 09:48:27 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id xrs4hZ-JWbfo for <ovs-dev@openvswitch.org>;\n Wed,  8 Sep 2021 09:48:26 +0000 (UTC)",
            "from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com\n [64.147.123.19])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 3379C613C8\n for <ovs-dev@openvswitch.org>; Wed,  8 Sep 2021 09:48:25 +0000 (UTC)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.west.internal (Postfix) with ESMTP id 6461E32009B8;\n Wed,  8 Sep 2021 05:48:25 -0400 (EDT)",
            "from mailfrontend2 ([10.202.2.163])\n by compute2.internal (MEProxy); Wed, 08 Sep 2021 05:48:25 -0400",
            "by mail.messagingengine.com (Postfix) with ESMTPA; Wed,\n 8 Sep 2021 05:48:24 -0400 (EDT)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "from auto-whitelisted by SQLgrey-1.8.0",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=u256.net; h=from\n :to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=fm2; bh=aB26RxIAtCCFM\n NmQB2UGijRqjeHk6rJTf7XXqczNycU=; b=nHyE+gL+gu05O7rbfLziasKgM1+Kw\n rZmVAi5XUFDKeIDLiKxsOviv7MHcZmSFvnYiuUQsB4iKttolG1XJ+GZ41KjltAkU\n 5pr7x4MlvWJbOilcvpkNGLPpLfpTfUpSHFgNiHgeDbUtcMihWj5C52CAOVgs4UsR\n YZN+Q3qjcbE4l5MJhX2Bie/WsRSqr59NUZubnGmwong5qbMKJjTkd9sCqu+TJIhW\n BYcQL9Zf2d4Vt7H+8auwZp+uhPPNBRHg8JQrKMFTUj1+pQEtlT1brfpB1kDFw5t8\n D7FHOyho3j4/aJpBW+yzYzFHNV7BEPvGglcglzu9b/KTcT8ZRBCCQPmzw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm3; bh=aB26RxIAtCCFMNmQB2UGijRqjeHk6rJTf7XXqczNycU=; b=CXBqOBFa\n 1xgoLFjoa+5owMHGZ7Yfatgua4sHBbU82MRctBE3GWpZeCxaN4mrguDbosyNoTOq\n uoZA/kOW0fZm3CF2Q/KfmIIrU1TS2iExryiI5uDG7ZDsqiKVF8cMOgWaduoLE6kF\n vcrd3l3v+zLTbPcfekEIS0miYnVwkTEn+b8WfbK1ZwnWCDWDSrKY92ao88/6AVQk\n 1+rf+CeieT2Co7bqAdzbLatmKuBUNwkgGC8aKHWsHDf1iqMUGcfy9i+8mhtDDDA5\n xctyG/QcL6GfUZ1tHLYzyXPJ8+iCadhUHQqn3KJByePdnslpMcs6b0K2udOmjM2G\n 3c3uL2TUOmr/sA=="
        ],
        "X-ME-Sender": "<xms:6IY4YTABFDFY1Jant2uR72MGvzcBfNMleu5FDYQVkG6IchgJDq03zw>\n <xme:6IY4YZi9y95ln_8QcKA0q0XrB0pQateVNeBwZeLyAO6WVCgKoNIKBh7ebep2ZxQKG\n n2n1MslqRd6Tg9n4ng>",
        "X-ME-Received": "\n <xmr:6IY4YemhlnhL-L775WhFGBtiejTk7lmjqxRvHWKpwfR6lCStKA3keOdnA-GoNpr5IqzmYoVhWGsgxMpIBxgCu73OdA>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedvtddrudefjedgudekucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefirggvthgr\n nhcutfhivhgvthcuoehgrhhivhgvsehuvdehiedrnhgvtheqnecuggftrfgrthhtvghrnh\n ephefgveffkeetheetfeeifedvheelfeejfeehveduteejhfekuedtkeeiuedvteehnecu\n vehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomhepghhrihhvvg\n esuhdvheeirdhnvght",
        "X-ME-Proxy": "<xmx:6IY4YVyySUPL9sv5gdJa4JcQ90FrBgB048O74oQGgUaNj_w_vQNPvQ>\n <xmx:6IY4YYRds03u_ssWrciRDcAHG0M7HDhsi-WZLG2719i-GAervDp8Tw>\n <xmx:6IY4YYYF-mmaZdDBd_LIOUgwg2x05Ybwj_CQAANJ3-YEroTKAwsIXA>\n <xmx:6YY4YTIt6nju5THA0ZHxaUujQiRY8584JgFZmHb4Znq56tSCApP5wA>",
        "From": "Gaetan Rivet <grive@u256.net>",
        "To": "ovs-dev@openvswitch.org",
        "Date": "Wed,  8 Sep 2021 11:47:39 +0200",
        "Message-Id": "\n <d7b210c055238a39349ee67500fea1bc2aa6e353.1631094144.git.grive@u256.net>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<cover.1631094144.git.grive@u256.net>",
        "References": "<cover.1631094144.git.grive@u256.net>",
        "MIME-Version": "1.0",
        "Cc": "Eli Britstein <elibr@nvidia.com>,\n Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Subject": "[ovs-dev] [PATCH v5 15/27] dpif-netdev: Quiesce offload thread\n\tperiodically",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "Similar to what was done for the PMD threads [1], reduce the performance\nimpact of quiescing too often in the offload thread.\n\nAfter each processed offload, the offload thread currently quiesce and\nwill sync with RCU. This synchronization can be lengthy and make the\nthread unnecessary slow.\n\nInstead attempt to quiesce every 10 ms at most. While the queue is\nempty, the offload thread remains quiescent.\n\n[1]: 81ac8b3b194c (\"dpif-netdev: Do RCU synchronization at fixed interval\n     in PMD main loop.\")\n\nSigned-off-by: Gaetan Rivet <grive@u256.net>\nReviewed-by: Eli Britstein <elibr@nvidia.com>\nReviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>\n---\n lib/dpif-netdev.c | 17 +++++++++++++++--\n 1 file changed, 15 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c\nindex c592f8c1d..c4672e6e5 100644\n--- a/lib/dpif-netdev.c\n+++ b/lib/dpif-netdev.c\n@@ -2660,15 +2660,20 @@ err_free:\n     return -1;\n }\n \n+#define DP_NETDEV_OFFLOAD_QUIESCE_INTERVAL_US (10 * 1000) /* 10 ms */\n+\n static void *\n dp_netdev_flow_offload_main(void *data OVS_UNUSED)\n {\n     struct dp_offload_thread_item *offload;\n     struct ovs_list *list;\n     long long int latency_us;\n+    long long int next_rcu;\n+    long long int now;\n     const char *op;\n     int ret;\n \n+    next_rcu = time_usec() + DP_NETDEV_OFFLOAD_QUIESCE_INTERVAL_US;\n     for (;;) {\n         ovs_mutex_lock(&dp_offload_thread.mutex);\n         if (ovs_list_is_empty(&dp_offload_thread.list)) {\n@@ -2676,6 +2681,7 @@ dp_netdev_flow_offload_main(void *data OVS_UNUSED)\n             ovs_mutex_cond_wait(&dp_offload_thread.cond,\n                                 &dp_offload_thread.mutex);\n             ovsrcu_quiesce_end();\n+            next_rcu = time_usec() + DP_NETDEV_OFFLOAD_QUIESCE_INTERVAL_US;\n         }\n         list = ovs_list_pop_front(&dp_offload_thread.list);\n         dp_offload_thread.enqueued_item--;\n@@ -2699,7 +2705,9 @@ dp_netdev_flow_offload_main(void *data OVS_UNUSED)\n             OVS_NOT_REACHED();\n         }\n \n-        latency_us = time_usec() - offload->timestamp;\n+        now = time_usec();\n+\n+        latency_us = now - offload->timestamp;\n         mov_avg_cma_update(&dp_offload_thread.cma, latency_us);\n         mov_avg_ema_update(&dp_offload_thread.ema, latency_us);\n \n@@ -2707,7 +2715,12 @@ dp_netdev_flow_offload_main(void *data OVS_UNUSED)\n                  ret == 0 ? \"succeed\" : \"failed\", op,\n                  UUID_ARGS((struct uuid *) &offload->flow->mega_ufid));\n         dp_netdev_free_flow_offload(offload);\n-        ovsrcu_quiesce();\n+\n+        /* Do RCU synchronization at fixed interval. */\n+        if (now > next_rcu) {\n+            ovsrcu_quiesce();\n+            next_rcu = time_usec() + DP_NETDEV_OFFLOAD_QUIESCE_INTERVAL_US;\n+        }\n     }\n \n     return NULL;\n",
    "prefixes": [
        "ovs-dev",
        "v5",
        "15/27"
    ]
}