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 1D71C45E21; Wed, 4 Dec 2024 00:50:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B743B40261; Wed, 4 Dec 2024 00:50:06 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 205FC4025D for ; Wed, 4 Dec 2024 00:50:05 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id E6B8D208A9; Wed, 4 Dec 2024 00:50:03 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v16 1/4] lib: add generic support for reading PMU events Date: Wed, 4 Dec 2024 00:49:58 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F911@smartserver.smartshare.dk> In-Reply-To: <20241203133925.026b0694@hermes.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v16 1/4] lib: add generic support for reading PMU events Thread-Index: AdtFy9zyXPj9oxMARCC6SaP1TE67CAAC5LNQ References: <20241025085414.3412068-1-tduszynski@marvell.com><20241118073706.3129423-1-tduszynski@marvell.com><20241118073706.3129423-2-tduszynski@marvell.com> <20241203133925.026b0694@hermes.local> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Stephen Hemminger" , "Tomasz Duszynski" Cc: "Thomas Monjalon" , , , , , , , , , 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 > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Tuesday, 3 December 2024 22.39 >=20 > On Mon, 18 Nov 2024 08:37:03 +0100 > Tomasz Duszynski wrote: >=20 > > +Performance counter based profiling > > +----------------------------------- > > + > > +Majority of architectures support some performance monitoring unit > (PMU). > > +Such unit provides programmable counters that monitor specific > events. > > + > > +Different tools gather that information, like for example perf. > > +However, in some scenarios when CPU cores are isolated and run > > +dedicated tasks interrupting those tasks with perf may be > undesirable. >=20 > The data should be folded into telemetry rather than introducing yet > another > DPDK API for applications to deal with. I strongly prefer the dedicated high-performance PMU API rather than = using telemetry for this. Please keep the PMU API. I expect to call the PMU API in our (proprietary) run-time profiling = library, where reading PMU counters should be as lean as calling = rte_rdtsc(). I sure don't want any superfluous overhead when profiling = with a very high sampling rate. For reference, many other libraries have dedicated APIs for reading the = statistics structures of those libraries. A wrapper around the PMU API can be added for Telemetry. IMO, the Telemetry library should be made optional, like the Trace = library recently was. For embedded systems, they are not only bloat, but = potentially helpful for hackers trying to break in. And Security is one = of the DPDK Governing Board's focus areas.