Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2194403/?format=api
{ "id": 2194403, "url": "http://patchwork.ozlabs.org/api/patches/2194403/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/patch/20260208195519.1851683-2-mmichels@redhat.com/", "project": { "id": 68, "url": "http://patchwork.ozlabs.org/api/projects/68/?format=api", "name": "Open Virtual Network development", "link_name": "ovn", "list_id": "ovs-dev.openvswitch.org", "list_email": "ovs-dev@openvswitch.org", "web_url": "http://openvswitch.org/", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260208195519.1851683-2-mmichels@redhat.com>", "list_archive_url": null, "date": "2026-02-08T19:55:13", "name": "[ovs-dev,v2,1/2] inc-proc-eng: Build stopwatches into every incremental node.", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "578a3b0558651e1c954b5c92301b410077f0b0df", "submitter": { "id": 71978, "url": "http://patchwork.ozlabs.org/api/people/71978/?format=api", "name": "Mark Michelson", "email": "mmichels@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ovn/patch/20260208195519.1851683-2-mmichels@redhat.com/mbox/", "series": [ { "id": 491435, "url": "http://patchwork.ozlabs.org/api/series/491435/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ovn/list/?series=491435", "date": "2026-02-08T19:55:12", "name": "Add stopwatches to incremental engine nodes.", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/491435/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2194403/comments/", "check": "success", "checks": "http://patchwork.ozlabs.org/api/patches/2194403/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<ovs-dev-bounces@openvswitch.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "dev@openvswitch.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "ovs-dev@lists.linuxfoundation.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=BHRsfphQ;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)", "smtp1.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=BHRsfphQ", "smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com", "smtp4.osuosl.org; dkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=BHRsfphQ" ], "Received": [ "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f8JTd1XRKz1xvc\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 09 Feb 2026 06:55:32 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id B1303812DC;\n\tSun, 8 Feb 2026 19:55:29 +0000 (UTC)", "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id z_H-swegolUK; Sun, 8 Feb 2026 19:55:28 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id AD4C5812E0;\n\tSun, 8 Feb 2026 19:55:27 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 23CFEC0780;\n\tSun, 8 Feb 2026 19:55:27 +0000 (UTC)", "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 05F8DC003D\n for <dev@openvswitch.org>; Sun, 8 Feb 2026 19:55:26 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id E3C99409C4\n for <dev@openvswitch.org>; Sun, 8 Feb 2026 19:55:25 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id 64WtEzcvxTjf for <dev@openvswitch.org>;\n Sun, 8 Feb 2026 19:55:25 +0000 (UTC)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp4.osuosl.org (Postfix) with ESMTPS id 0DBAF4080B\n for <dev@openvswitch.org>; Sun, 8 Feb 2026 19:55:24 +0000 (UTC)", "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-2zd92mSbNSCtCbUfxuNeEA-1; Sun,\n 08 Feb 2026 14:55:21 -0500", "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id F102F195608F\n for <dev@openvswitch.org>; Sun, 8 Feb 2026 19:55:20 +0000 (UTC)", "from localhost.localdomain.com (unknown [10.22.64.91])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 79FFB1956056\n for <dev@openvswitch.org>; Sun, 8 Feb 2026 19:55:20 +0000 (UTC)" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.9.56;\n helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp1.osuosl.org AD4C5812E0", "OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0DBAF4080B" ], "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=mmichels@redhat.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org 0DBAF4080B", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770580523;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=+y6fk/3kZWm4wqDa0msZnBC3JrGXEL+KQcsS+65DWXc=;\n b=BHRsfphQMEcAoSC3S5yxHEk5HyYNjVyJrC5ZycotGSdNmkJQ7yk0T0gSd0adQ6/++A/tlE\n FbscJ6WYAf11YfRCzeej9Ljf3p/+XUQIMUj8lJCe1VkyVVDl91FGGZXfcoKWeHNpUrHP7S\n 6RrBhO5fOt5zzevyzougvvY/jHuIxQc=", "X-MC-Unique": "2zd92mSbNSCtCbUfxuNeEA-1", "X-Mimecast-MFC-AGG-ID": "2zd92mSbNSCtCbUfxuNeEA_1770580521", "To": "dev@openvswitch.org", "Date": "Sun, 8 Feb 2026 14:55:13 -0500", "Message-ID": "<20260208195519.1851683-2-mmichels@redhat.com>", "In-Reply-To": "<20260208195519.1851683-1-mmichels@redhat.com>", "References": "<20260208195519.1851683-1-mmichels@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17", "X-Mimecast-Spam-Score": "0", "X-Mimecast-MFC-PROC-ID": "vhrXfGVwn3llgGiPp8fCcBNwZO7FAWR-ln9Di-HsPm0_1770580521", "X-Mimecast-Originator": "redhat.com", "Subject": "[ovs-dev] [PATCH ovn v2 1/2] inc-proc-eng: Build stopwatches into\n every incremental node.", "X-BeenThere": "ovs-dev@openvswitch.org", "X-Mailman-Version": "2.1.30", "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>", "From": "Mark Michelson via dev <ovs-dev@openvswitch.org>", "Reply-To": "Mark Michelson <mmichels@redhat.com>", "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": "This change implements stopwatches for each incremental node. Every\nincremental node has a stopwatch that calculates the time it takes to\nrun a recompute. Every incremental node also has a stopwatch for each of\nits input handlers.\n\nThis commit also introduces a new ovn-appctl command to list the\nstopwatches associated with the incremental engine. This can be used in\nscripts, such as:\n\n for i in $(ovn-appctl inc-engine/list-stopwatches <node_name>); do\n ovn-appctl stopwatch/show $i\n ovn-appctl stopwatch/reset $i\n done\n\nSigned-off-by: Mark Michelson <mmichels@redhat.com>\n---\n lib/inc-proc-eng.c | 60 ++++++++++++++++++++++++++++++++++++++++++----\n lib/inc-proc-eng.h | 5 +++-\n 2 files changed, 60 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/inc-proc-eng.c b/lib/inc-proc-eng.c\nindex 839f6cfca..26c43d0f2 100644\n--- a/lib/inc-proc-eng.c\n+++ b/lib/inc-proc-eng.c\n@@ -33,6 +33,7 @@\n #include \"unixctl.h\"\n #include \"vec.h\"\n #include \"sset.h\"\n+#include \"lib/stopwatch.h\"\n \n VLOG_DEFINE_THIS_MODULE(inc_proc_eng);\n \n@@ -194,6 +195,31 @@ engine_set_log_timeout_cmd(struct unixctl_conn *conn, int argc OVS_UNUSED,\n unixctl_command_reply(conn, NULL);\n }\n \n+static void\n+engine_list_stopwatch_cmd(struct unixctl_conn *conn, int argc OVS_UNUSED,\n+ const char *argv[], void *arg OVS_UNUSED)\n+{\n+ const char *node_name = argc > 1 ? argv[1] : NULL;\n+ struct engine_node *node;\n+ struct ds output_str = DS_EMPTY_INITIALIZER;\n+ VECTOR_FOR_EACH (&engine_nodes, node) {\n+ if (node_name && strcmp(node->name, node_name)) {\n+ continue;\n+ }\n+ ds_put_format(&output_str, \"%s\\n\", node->recompute_stopwatch);\n+ for (size_t i = 0; i < node->n_inputs; i++) {\n+ struct engine_node_input *input = &node->inputs[i];\n+ if (!input->change_handler) {\n+ continue;\n+ }\n+ ds_put_format(&output_str, \"%s\\n\", input->change_handler_name);\n+ }\n+ }\n+\n+ unixctl_command_reply(conn, ds_cstr(&output_str));\n+ ds_destroy(&output_str);\n+}\n+\n static void\n engine_get_compute_failure_info(struct engine_node *node)\n {\n@@ -217,6 +243,7 @@ engine_init(struct engine_node *node, struct engine_arg *arg)\n sorted_node->get_compute_failure_info =\n engine_get_compute_failure_info;\n }\n+ stopwatch_create(sorted_node->recompute_stopwatch, SW_MS);\n }\n \n unixctl_command_register(\"inc-engine/show-stats\", \"\", 0, 2,\n@@ -227,6 +254,8 @@ engine_init(struct engine_node *node, struct engine_arg *arg)\n engine_trigger_recompute_cmd, NULL);\n unixctl_command_register(\"inc-engine/compute-log-timeout\", \"\", 1, 1,\n engine_set_log_timeout_cmd, NULL);\n+ unixctl_command_register(\"inc-engine/list-stopwatches\", \"\", 0, 1,\n+ engine_list_stopwatch_cmd, NULL);\n }\n \n void\n@@ -276,6 +305,9 @@ engine_add_input_impl(struct engine_node *node, struct engine_node *input,\n node->inputs[node->n_inputs].node = input;\n node->inputs[node->n_inputs].change_handler = change_handler;\n node->inputs[node->n_inputs].change_handler_name = change_handler_name;\n+ if (change_handler) {\n+ stopwatch_create(change_handler_name, SW_MS);\n+ }\n node->n_inputs ++;\n }\n \n@@ -417,6 +449,26 @@ engine_init_run(void)\n }\n }\n \n+static enum engine_node_state\n+run_recompute_callback(struct engine_node *node)\n+{\n+ enum engine_node_state ret;\n+ stopwatch_start(node->recompute_stopwatch, time_msec());\n+ ret = node->run(node, node->data);\n+ stopwatch_stop(node->recompute_stopwatch, time_msec());\n+ return ret;\n+}\n+\n+static enum engine_input_handler_result\n+run_change_handler(struct engine_node *node, struct engine_node_input *input)\n+{\n+ enum engine_input_handler_result ret;\n+ stopwatch_start(input->change_handler_name, time_msec());\n+ ret = input->change_handler(node, node->data);\n+ stopwatch_stop(input->change_handler_name, time_msec());\n+ return ret;\n+}\n+\n /* Do a full recompute (or at least try). If we're not allowed then\n * mark the node as \"canceled\".\n */\n@@ -445,7 +497,7 @@ engine_recompute(struct engine_node *node, bool allowed,\n \n /* Run the node handler which might change state. */\n long long int now = time_msec();\n- engine_set_node_state(node, node->run(node, node->data),\n+ engine_set_node_state(node, run_recompute_callback(node),\n \"recompute run() result\");\n node->stats.recompute++;\n long long int delta_time = time_msec() - now;\n@@ -475,7 +527,7 @@ engine_compute(struct engine_node *node, bool recompute_allowed)\n */\n long long int now = time_msec();\n enum engine_input_handler_result handled;\n- handled = node->inputs[i].change_handler(node, node->data);\n+ handled = run_change_handler(node, &node->inputs[i]);\n long long int delta_time = time_msec() - now;\n if (delta_time > engine_compute_log_timeout_msec) {\n static struct vlog_rate_limit rl =\n@@ -512,7 +564,7 @@ engine_run_node(struct engine_node *node, bool recompute_allowed)\n {\n if (!node->n_inputs) {\n /* Run the node handler which might change state. */\n- engine_set_node_state(node, node->run(node, node->data),\n+ engine_set_node_state(node, run_recompute_callback(node),\n \"run() result due to having no inputs\");\n node->stats.recompute++;\n return;\n@@ -597,7 +649,7 @@ engine_need_run(void)\n continue;\n }\n \n- engine_set_node_state(node, node->run(node, node->data),\n+ engine_set_node_state(node, run_recompute_callback(node),\n \"checking if engine needs to be run\");\n node->stats.recompute++;\n VLOG_DBG(\"input node: %s, state: %s\", node->name,\ndiff --git a/lib/inc-proc-eng.h b/lib/inc-proc-eng.h\nindex 1cb2466b2..d689e8cd2 100644\n--- a/lib/inc-proc-eng.h\n+++ b/lib/inc-proc-eng.h\n@@ -282,6 +282,8 @@ struct engine_node {\n \n /* Indication if the node writes to SB DB. */\n bool sb_write;\n+\n+ char *recompute_stopwatch;\n };\n \n /* Initialize the data for the engine nodes. It calls each node's\n@@ -440,7 +442,8 @@ void engine_ovsdb_node_add_index(struct engine_node *, const char *name,\n .state = EN_STALE, \\\n .init = en_##NAME##_init, \\\n .run = en_##NAME##_run, \\\n- .cleanup = en_##NAME##_cleanup,\n+ .cleanup = en_##NAME##_cleanup, \\\n+ .recompute_stopwatch = NAME_STR,\n \n #define ENGINE_NODE_DEF_END };\n \n", "prefixes": [ "ovs-dev", "v2", "1/2" ] }