From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EFBE6A0032; Wed, 14 Sep 2022 11:26:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E260241147; Wed, 14 Sep 2022 11:26:18 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 09BFB40151 for ; Wed, 14 Sep 2022 11:26:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663147578; x=1694683578; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vUewZEG0zAZRdbK2GLn5W4v8YnQdYU0h3U2HRU0NVEU=; b=Zok5vITdflxzSr7RJ0FX7bLJsFddGPgPAGaeE32p5S9Py7rJnamVrBoN UjlCaDIi6EX3kWsuxa/2g0bVHtrQHt6GgTOAHK7S1k0wWH9NoB+MMVb9a mXeQSudoU0dpaA7IvBqqhTtqTmn+SjXPiykpc+wUxbWzLu99PAZFGHD+g yPnLA9cxMKbh+kshd5ekDHiq2235q7G8JVe9ZYAn/OGTHhV32YqQWzoG8 TvFWWNPKMfZoGCN4rpiB6RBu55hK04h1Zj9wn1OZSuXzs1YMQD3cFYvDc cUKES9tpSRnKVypZgwuo/6VtOUPz6I54V2DYsrYIouEZB0DNQ9TeH2Mcl Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10469"; a="299740121" X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="299740121" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 02:26:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,315,1654585200"; d="scan'208";a="612446461" Received: from silpixa00401122.ir.intel.com ([10.237.213.42]) by orsmga007.jf.intel.com with ESMTP; 14 Sep 2022 02:26:16 -0700 From: Kevin Laatz To: dev@dpdk.org Cc: anatoly.burakov@intel.com, Kevin Laatz Subject: [PATCH v7 0/4] Add lcore poll busyness telemetry Date: Wed, 14 Sep 2022 10:29:25 +0100 Message-Id: <20220914092929.1159773-1-kevin.laatz@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <24c49429394294cfbf0d9c506b205029bac77c8b.1657890378.git.anatoly.burakov@intel.com> References: <24c49429394294cfbf0d9c506b205029bac77c8b.1657890378.git.anatoly.burakov@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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Currently, there is no way to measure lcore polling busyness in a passive way, without any modifications to the application. This patchset adds a new EAL API that will be able to passively track core polling busyness. As part of the set, new telemetry endpoints are added to read the generate metrics. --- v7: * Rename funcs, vars, files to include "poll" where missing. v6: * Add API and perf unit tests v5: * Fix Windows build * Make lcore_telemetry_free() an internal interface * Minor cleanup v4: * Fix doc build * Rename timestamp macro to RTE_LCORE_POLL_BUSYNESS_TIMESTAMP * Make enable/disable read and write atomic * Change rte_lcore_poll_busyness_enabled_set() param to bool * Move mem alloc from enable/disable to init/cleanup * Other minor fixes v3: * Fix missing renaming to poll busyness * Fix clang compilation * Fix arm compilation v2: * Use rte_get_tsc_hz() to adjust the telemetry period * Rename to reflect polling busyness vs general busyness * Fix segfault when calling telemetry timestamp from an unregistered non-EAL thread. * Minor cleanup Anatoly Burakov (2): eal: add lcore poll busyness telemetry eal: add cpuset lcore telemetry entries Kevin Laatz (2): app/test: add unit tests for lcore poll busyness doc: add howto guide for lcore poll busyness app/test/meson.build | 4 + app/test/test_lcore_poll_busyness_api.c | 134 +++++++ app/test/test_lcore_poll_busyness_perf.c | 72 ++++ config/meson.build | 1 + config/rte_config.h | 1 + doc/guides/howto/index.rst | 1 + doc/guides/howto/lcore_poll_busyness.rst | 93 +++++ lib/bbdev/rte_bbdev.h | 17 +- lib/compressdev/rte_compressdev.c | 2 + lib/cryptodev/rte_cryptodev.h | 2 + lib/distributor/rte_distributor.c | 21 +- lib/distributor/rte_distributor_single.c | 14 +- lib/dmadev/rte_dmadev.h | 15 +- .../common/eal_common_lcore_poll_telemetry.c | 350 ++++++++++++++++++ lib/eal/common/meson.build | 1 + lib/eal/freebsd/eal.c | 1 + lib/eal/include/rte_lcore.h | 85 ++++- lib/eal/linux/eal.c | 1 + lib/eal/meson.build | 3 + lib/eal/version.map | 7 + lib/ethdev/rte_ethdev.h | 2 + lib/eventdev/rte_eventdev.h | 10 +- lib/rawdev/rte_rawdev.c | 6 +- lib/regexdev/rte_regexdev.h | 5 +- lib/ring/rte_ring_elem_pvt.h | 1 + meson_options.txt | 2 + 26 files changed, 826 insertions(+), 25 deletions(-) create mode 100644 app/test/test_lcore_poll_busyness_api.c create mode 100644 app/test/test_lcore_poll_busyness_perf.c create mode 100644 doc/guides/howto/lcore_poll_busyness.rst create mode 100644 lib/eal/common/eal_common_lcore_poll_telemetry.c -- 2.31.1