Message ID | 20221129153329.181652-1-rjarry@redhat.com (mailing list archive) |
---|---|
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]) by inbox.dpdk.org (Postfix) with ESMTP id E0547A00C3; Tue, 29 Nov 2022 16:33:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D264240691; Tue, 29 Nov 2022 16:33:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5D3034067E for <dev@dpdk.org>; Tue, 29 Nov 2022 16:33:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669736015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o4/7U0MHA7Xv7fQhbMHbtoMz6SJWZyR42qE0PMIdg4E=; b=TCggpO1FNyVLRQkhQLLCWS8lIzAIh3XLQKc4mm4gzjiKfYGn5RWgWzWpNBhuItIZ4gf8CY Zuf2uV5ioMfsD7DaFtGuKKfRzsyLGVytIwJ77ocVl3R5G37CIOLCSMqw+Ncpa8IA0I2zbW +lFfXL0ZdC417IUc8xHn4MoZfiikrKw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-272-Knz-PLptN52mxdc9lcKuqA-1; Tue, 29 Nov 2022 10:33:34 -0500 X-MC-Unique: Knz-PLptN52mxdc9lcKuqA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 698193C1022D for <dev@dpdk.org>; Tue, 29 Nov 2022 15:33:34 +0000 (UTC) Received: from paul.home (unknown [10.39.208.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id C14AA17593; Tue, 29 Nov 2022 15:33:33 +0000 (UTC) From: Robin Jarry <rjarry@redhat.com> To: dev@dpdk.org Cc: Robin Jarry <rjarry@redhat.com> Subject: [PATCH v3 0/4] lcore telemetry improvements Date: Tue, 29 Nov 2022 16:33:25 +0100 Message-Id: <20221129153329.181652-1-rjarry@redhat.com> In-Reply-To: <20221123102612.1688865-1-rjarry@redhat.com> References: <20221123102612.1688865-1-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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>, <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>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series | lcore telemetry improvements | |
Message
Robin Jarry
Nov. 29, 2022, 3:33 p.m. UTC
This is a follow up on previous work by Kevin Laatz: http://patches.dpdk.org/project/dpdk/list/?series=24658&state=* This series is aimed at allowing DPDK applications to expose their CPU usage stats in the DPDK telemetry under /eal/lcore/info. This is a much more basic and naive approach which leaves the cpu cycles accounting completely up to the application. For reference, I have implemented a draft patch in OvS to use rte_lcore_register_usage_cb() and report the already available busy cycles information. https://github.com/rjarry/ovs/commit/327db12c751be0375fcfed5e44b6065bcfb75c82 Changes since v2: - Fixed typos in docstrings. - Used if (xxx != NULL) instead of if (xxx) test convention. - Guarded against an unlikely race if rte_lcore_dump() is called by a thread while another one calls rte_lcore_register_usage_cb(NULL). - s/utilization/usage/ - Fixed build on Windows. Changes since v1: - The cpuset field in telemetry is now a JSON list of CPU ids. - Applications must now report their raw CPU cycles counts. The busyness ratio and rate of change is left to external monitoring tools. - Renamed show lcores -> dump_lcores in testpmd. Robin Jarry (4): eal: add lcore info in telemetry eal: allow applications to report their cpu cycles usage testpmd: add dump_lcores command testpmd: report lcore usage app/test-pmd/5tswap.c | 5 +- app/test-pmd/cmdline.c | 3 + app/test-pmd/csumonly.c | 6 +- app/test-pmd/flowgen.c | 2 +- app/test-pmd/icmpecho.c | 6 +- app/test-pmd/iofwd.c | 5 +- app/test-pmd/macfwd.c | 5 +- app/test-pmd/macswap.c | 5 +- app/test-pmd/noisy_vnf.c | 4 + app/test-pmd/rxonly.c | 5 +- app/test-pmd/shared_rxq_fwd.c | 5 +- app/test-pmd/testpmd.c | 39 ++++++++- app/test-pmd/testpmd.h | 14 +++- app/test-pmd/txonly.c | 7 +- lib/eal/common/eal_common_lcore.c | 131 +++++++++++++++++++++++++++++- lib/eal/include/rte_lcore.h | 29 +++++++ lib/eal/version.map | 1 + 17 files changed, 242 insertions(+), 30 deletions(-)
Comments
On 2022-11-29 16:33, Robin Jarry wrote: > This is a follow up on previous work by Kevin Laatz: > > http://patches.dpdk.org/project/dpdk/list/?series=24658&state=* > > This series is aimed at allowing DPDK applications to expose their CPU > usage stats in the DPDK telemetry under /eal/lcore/info. This is a much > more basic and naive approach which leaves the cpu cycles accounting > completely up to the application. > This seems like a reasonable approach to me. DPDK needs to have more OS-type constructs for a feature like this to be implemented, without application involvement. I would love for this to happen, but we aren't there yet. > For reference, I have implemented a draft patch in OvS to use > rte_lcore_register_usage_cb() and report the already available busy > cycles information. > > https://github.com/rjarry/ovs/commit/327db12c751be0375fcfed5e44b6065bcfb75c82 > > Changes since v2: > > - Fixed typos in docstrings. > - Used if (xxx != NULL) instead of if (xxx) test convention. > - Guarded against an unlikely race if rte_lcore_dump() is called by > a thread while another one calls rte_lcore_register_usage_cb(NULL). > - s/utilization/usage/ > - Fixed build on Windows. > > Changes since v1: > > - The cpuset field in telemetry is now a JSON list of CPU ids. > - Applications must now report their raw CPU cycles counts. The busyness > ratio and rate of change is left to external monitoring tools. > - Renamed show lcores -> dump_lcores in testpmd. > > Robin Jarry (4): > eal: add lcore info in telemetry > eal: allow applications to report their cpu cycles usage > testpmd: add dump_lcores command > testpmd: report lcore usage > > app/test-pmd/5tswap.c | 5 +- > app/test-pmd/cmdline.c | 3 + > app/test-pmd/csumonly.c | 6 +- > app/test-pmd/flowgen.c | 2 +- > app/test-pmd/icmpecho.c | 6 +- > app/test-pmd/iofwd.c | 5 +- > app/test-pmd/macfwd.c | 5 +- > app/test-pmd/macswap.c | 5 +- > app/test-pmd/noisy_vnf.c | 4 + > app/test-pmd/rxonly.c | 5 +- > app/test-pmd/shared_rxq_fwd.c | 5 +- > app/test-pmd/testpmd.c | 39 ++++++++- > app/test-pmd/testpmd.h | 14 +++- > app/test-pmd/txonly.c | 7 +- > lib/eal/common/eal_common_lcore.c | 131 +++++++++++++++++++++++++++++- > lib/eal/include/rte_lcore.h | 29 +++++++ > lib/eal/version.map | 1 + > 17 files changed, 242 insertions(+), 30 deletions(-) >