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 F133145E26; Wed, 4 Dec 2024 01:55:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCD3A40261; Wed, 4 Dec 2024 01:55:32 +0100 (CET) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id 8E9944025D for ; Wed, 4 Dec 2024 01:55:31 +0100 (CET) Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-7fc1f1748a3so4072905a12.1 for ; Tue, 03 Dec 2024 16:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1733273730; x=1733878530; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=AcwUjI9M3wll/UU42E308HfESQqStOH3GvChthx0bU4=; b=U0Pz6/vZjOdWg5qq3slYKz/9Jo7j4VWhZ8iWNpo436unNJyqcH77G1cnpM/qw06JvI esjr9TlMa06Q6bqnnKq02p9w8QfRafD62MKeGVmc907HZW+sidOw8V/LdXrDLBl6rY7d HCeOHRdAFCIWGSRZmlc8lN0NIPwOY6xMh9EKeuXst0hCdwimwsVugV5xtvjGAASaSE2j 1qa/KTn6yJzJ83lyXG8UWum+2Rz9T7AC0x5DOHmgZpWjfcU32JmneBZxQTpzq4gOiTxx M4EXOE0q1mAYiSJa4WJlDQWRCec9BWLpTMJRPly1aPPt/209GlubpSuj2nDAzAATF6zw xFXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733273730; x=1733878530; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AcwUjI9M3wll/UU42E308HfESQqStOH3GvChthx0bU4=; b=X15fzIRDXIRwSvJMKygcy6xITLVYmg4VQA2AmKceLNUS9MFA+Aj/4FeKiuGo9YRSWw LlCgCfflP6MIOAcrKMrNW6Zs5BxUc99ezOgdjqyBlCupXD2XB4p1GU03pawjyP2oQQac bLu5OjOnNik0f/6x0Lp2BrTDekIFYy7Npu8Mb++BSTnYkhXs8QYtXBhwaCMPDrtzMeQ2 9XdGHcOYWyld/nhgcqgnCpViCNTmebFJ6sjyLOgaF6S/+vKVxabwpxO/FgV3v7F/koCL ylJQMWi/3gbFYVGbI9zgs3b+EvjqiVZjg3Ef2AZBYeacwq6uysJHZmDgaenwnYkDNEbc B/vQ== X-Forwarded-Encrypted: i=1; AJvYcCUdftT1beZCxYbemv0iJTM9nP/FvosyEGqZTVm4UCZUTMAGOkDnW3UD0qNBfzu/eeQTdho=@dpdk.org X-Gm-Message-State: AOJu0Yz8Ic+nPApeXGwmorWtSrbbxgIS4ukFYFuxrwwxIhQTN9+nWQ20 ESgZ3TzvLou13toL7WYT20L7qtoMZgOnusPmb5q4JRQnpPX0F6pioz9QT3tR6FM= X-Gm-Gg: ASbGncvW5jJxkR6OQKlb6IzItgHyIeEC3apsovtqwWg1/HBxEt7eFOy2RcJCDuLYxLq 0HGlnT/BE2e3Vfw2mSqKV7Sa4YNL+z6eG3MzKCt7m0uoxAQW4MH6yg1GNFC868O2ORvmdhsq5Ur ZvHL1DDxS2bA/nHKmOqjdhh0IhwDBD0Xv0zpFRjufh2Vz6alr5hZieeGieCXKiVN9bDWoxUmOx2 YC/oFtR33sFjYPh58LBNBf4JYCufHmSAvERHY9/R6UNOXBP9bp82Hq4v2DlttxjKsQDpQxWSYhv U+B324D0DRRl8AZQmDN5O0SBu9g= X-Google-Smtp-Source: AGHT+IFqPWImR2pnYmbE+gHTJgjk4sXvhidaLoTK9twn8dMQUQJnb1oeCuPcIz21GRZuKajwDmXnNg== X-Received: by 2002:a05:6a20:914c:b0:1db:f68a:d943 with SMTP id adf61e73a8af0-1e1653b9996mr6167326637.17.1733273730617; Tue, 03 Dec 2024 16:55:30 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7254176fc75sm11494021b3a.65.2024.12.03.16.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2024 16:55:30 -0800 (PST) Date: Tue, 3 Dec 2024 16:55:28 -0800 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "Tomasz Duszynski" , "Thomas Monjalon" , , , , , , , , , Subject: Re: [PATCH v16 1/4] lib: add generic support for reading PMU events Message-ID: <20241203165528.581fed50@hermes.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F911@smartserver.smartshare.dk> References: <20241025085414.3412068-1-tduszynski@marvell.com> <20241118073706.3129423-1-tduszynski@marvell.com> <20241118073706.3129423-2-tduszynski@marvell.com> <20241203133925.026b0694@hermes.local> <98CBD80474FA8B44BF855DF32C47DC35E9F911@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Wed, 4 Dec 2024 00:49:58 +0100 Morten Br=C3=B8rup wrote: > > 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 = =20 > > (PMU). =20 > > > +Such unit provides programmable counters that monitor specific =20 > > events. =20 > > > + > > > +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 =20 > > undesirable. > >=20 > > The data should be folded into telemetry rather than introducing yet > > another > > DPDK API for applications to deal with. =20 >=20 > I strongly prefer the dedicated high-performance PMU API rather than usin= g telemetry for this. > Please keep the PMU API. >=20 > I expect to call the PMU API in our (proprietary) run-time profiling libr= ary, 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 s= ampling rate. >=20 > For reference, many other libraries have dedicated APIs for reading the s= tatistics structures of those libraries. >=20 > A wrapper around the PMU API can be added for Telemetry. >=20 > IMO, the Telemetry library should be made optional, like the Trace librar= y recently was. For embedded systems, they are not only bloat, but potentia= lly helpful for hackers trying to break in. And Security is one of the DPDK= Governing Board's focus areas. >=20 Can this data go right into perf? It is not clear why this is better than just using perf? The one use case I can think of is a cloud provider with lots and lots of e= mbedded systems. But in that case they already have much more detailed and integrated tools,= the DPDK stuff is not needed.