Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4327186rdb; Thu, 28 Dec 2023 19:29:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrqcWwPLIrAlCm+bpFIvD3jJf6cojGrzcAFHzaIBJ/98cQH7ur8ObVUovldfRJbthHO7yx X-Received: by 2002:a17:906:5347:b0:a26:f2da:83d5 with SMTP id j7-20020a170906534700b00a26f2da83d5mr2529839ejo.34.1703820581609; Thu, 28 Dec 2023 19:29:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703820581; cv=none; d=google.com; s=arc-20160816; b=Jt1PmtuZ0hxIFUlJgaBRgllGp/0wTscD/GvX7+o5tCVLvz8rb9IxIUV/fAwpShWEL9 m2BWitH8aD5TwlTdjM0EpN7Clq3fdILBFfU2OEKKzqCgOoA6qFlRYxkYazUHpYQbc115 geUCN2DI18r4Z6jftu2qfNifCJP9DIPEImiU5I2BsSAGU+Ywi0LINNoDHRlpWWhFNPDV nVrECMmbEBMInpa1x4vxoG9T1R6EgXe+zcpY4gJrBb/+td3hQrqSV95QEJV0leM9q4/K xi8cpZvosn4cS7BQZDK53UzACNpBhuViJXmhRfLXCUoGjPKO7KzEUubn48S/osAsyARU aj6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=6yaYxrEYY+FL7hFGDL/OgdFs1kdQbm6QuesDmWmGQg8=; fh=IAkf2h8Lx810wAa81hakf4XbbF/B2F6Qi2M6h0+1zAk=; b=bCtzCT8p/es/t+f7/Khbi4jsUvejt5G2oJyUbU4CvsP/IlRvwuHZoca44isI2DhY0A L7lV4MbCOzUzwnQnHvtDalszGuaHPMevVaZqTD9C/EUODokW4cCuqbXlASau3Ow5zWAW DytDfnBV57uGRRP+Jt9hI8uYAEdZMYg4kj1DEutlSSOj+FEv6ll1n8SapoFE6vrg6fti pcZ7NFRo4ioj2P0MtDvJy28cLkxb7jTmLYP4kWcj/I+e3c5rjVhHKG7sITg3m5kwdV2T jjcv1cRGbFyltIwc+igUt23XOvUGH1Rgs1z4Aa3RNRSNalyOf2P028AJfjHOXESzEyRM qj9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-1081-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1081-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n10-20020a170906700a00b00a2774b21bcbsi697560ejj.774.2023.12.28.19.29.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 19:29:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1081-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-1081-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1081-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3FC041F21662 for ; Fri, 29 Dec 2023 03:29:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0E82B660; Fri, 29 Dec 2023 03:29:36 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F34FB64F for ; Fri, 29 Dec 2023 03:29:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gondor.apana.org.au Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1rJ3Yw-00FG8u-B2; Fri, 29 Dec 2023 11:29:31 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 29 Dec 2023 11:29:41 +0800 Date: Fri, 29 Dec 2023 11:29:41 +0800 From: Herbert Xu To: Lucas Segarra Fernandez Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com Subject: Re: [PATCH v2 0/4] crypto: qat - enable telemetry for QAT GEN 4 Message-ID: References: <20231222103508.1037442-1-lucas.segarra.fernandez@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231222103508.1037442-1-lucas.segarra.fernandez@intel.com> On Fri, Dec 22, 2023 at 11:35:04AM +0100, Lucas Segarra Fernandez wrote: > Expose through debugfs telemetry data for QAT GEN4 devices. > > This allows to gather metrics about the performance and the utilization > of a QAT device and/or a group of ring pairs. In particular, statistics > on (1) the utilization of the PCIe channel, (2) address translation and > device TLB, when SVA is enabled and (3) the internal engines for crypto > and data compression. > > The device periodically gathers telemetry data from hardware registers > and writes it into a DMA memory region which is sampled by the driver. > The driver then uses this data to compute basic metrics on the counters > and exposes them through debugfs attributes in the folder > /sys/kernel/debug/qat__/telemetry. > > Here is a summary of the changes: > * Patch #1 adds an helper function to math.h to compute the average of > values within an array. > * Patch #2 includes a missing header in the file adf_accel_devices.h to > allow to use the macro GET_DEV(). > * Patch #3 introduces device level telemetry and the associated documentation > in /Documentation/ABI. > * Patch #4 extends #3 by introducing ring pair level telemetry and > documentation about it. > > This set is based on earlier work done by Wojciech Ziemba. > > --- > v1 -> v2: > - define avg_array() in the C file where it is used > - set `accel_dev->telemetry` to NULL in adf_tl_free_mem() > - add ring pair service type info to debugfs telemetry/rp__data output > --- > > Lucas Segarra Fernandez (4): > crypto: qat - include pci.h for GET_DEV() > crypto: qat - add admin msgs for telemetry > crypto: qat - add support for device telemetry > crypto: qat - add support for ring pair level telemetry > > .../ABI/testing/debugfs-driver-qat_telemetry | 228 ++++++ > .../intel/qat/qat_420xx/adf_420xx_hw_data.c | 3 + > .../intel/qat/qat_4xxx/adf_4xxx_hw_data.c | 3 + > drivers/crypto/intel/qat/qat_common/Makefile | 3 + > .../intel/qat/qat_common/adf_accel_devices.h | 6 + > .../crypto/intel/qat/qat_common/adf_admin.c | 37 + > .../crypto/intel/qat/qat_common/adf_admin.h | 4 + > .../crypto/intel/qat/qat_common/adf_dbgfs.c | 3 + > .../intel/qat/qat_common/adf_gen4_hw_data.h | 1 + > .../crypto/intel/qat/qat_common/adf_gen4_tl.c | 153 ++++ > .../crypto/intel/qat/qat_common/adf_gen4_tl.h | 158 ++++ > .../crypto/intel/qat/qat_common/adf_init.c | 12 + > .../intel/qat/qat_common/adf_telemetry.c | 288 +++++++ > .../intel/qat/qat_common/adf_telemetry.h | 99 +++ > .../intel/qat/qat_common/adf_tl_debugfs.c | 710 ++++++++++++++++++ > .../intel/qat/qat_common/adf_tl_debugfs.h | 117 +++ > .../qat/qat_common/icp_qat_fw_init_admin.h | 10 + > 17 files changed, 1835 insertions(+) > create mode 100644 Documentation/ABI/testing/debugfs-driver-qat_telemetry > create mode 100644 drivers/crypto/intel/qat/qat_common/adf_gen4_tl.c > create mode 100644 drivers/crypto/intel/qat/qat_common/adf_gen4_tl.h > create mode 100644 drivers/crypto/intel/qat/qat_common/adf_telemetry.c > create mode 100644 drivers/crypto/intel/qat/qat_common/adf_telemetry.h > create mode 100644 drivers/crypto/intel/qat/qat_common/adf_tl_debugfs.c > create mode 100644 drivers/crypto/intel/qat/qat_common/adf_tl_debugfs.h > > > base-commit: b4719435c14199548ed49f036a7c31040a6b5353 > -- > 2.41.0 All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt