Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp3121208rdb; Tue, 13 Feb 2024 07:28:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPR0lY7I7da3yJ13iHzsWp0slCBb4E459I+vcB1lQsT94uIjGaQ7C7fyHTR+VD+6+mu4z2N/QZu/07VkrjOc+Z6IenuFeF3kWrM4vTZg== X-Google-Smtp-Source: AGHT+IEfOhlY1Z5xQmR4fBGccd85NgVJ6e5NnOtxEwIp7/PTutN+bUu0/cx9IjOxVQClrFZK5PNN X-Received: by 2002:a17:906:260f:b0:a3d:2762:71f5 with SMTP id h15-20020a170906260f00b00a3d276271f5mr300125ejc.28.1707838139605; Tue, 13 Feb 2024 07:28:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707838139; cv=pass; d=google.com; s=arc-20160816; b=RPlnDGwn7y0XtjAVF0qVtPwPHmCHWi1SFuTjKpPmSOQVO5SN0mnIPdkfkv9YAXcGAw vUFomcjoYRNbFaC5K8qiEjrZR298fskIne/WIpgK1BzREpitoM8tsSRlYnmuyvO/bvTP I5g2FgN7sY094/Q8GkhkZtSG/10fxOvnxJMV8iRea+lfyfagm0ue2aQjA/JG8DkzvXxd MN8KPhov+/CI/Ir0SXxg3EFALadw0+MRwkmN65tBGKF5XI5gO4G857Egl8DGFS1n11ID CBb2GKXpk33zp8VFiKjtM6i3ize5HLpAu99wS7ouyJhQKqSdApe3exeEhQbMJtzPWMR2 WQvA== ARC-Message-Signature: i=2; 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:dkim-signature; bh=V9CB4cvnLXemqSf2zS4ILtmK8Rp5E3DjDQaI2chrUmQ=; fh=1TyOm/RusQpoxiw6PCQlW/u6Sw51XKs9tpnSBstwUi0=; b=YfNdjFzihGeoUAAehvKDeVYjWP0rS+iW0nxKaL7AmOUGfI0SYTYyRw5zoeDsaflrbO 4tnDMzeJ2RlAHhG3y2xmLavLhVYACGSbj50Ilacf4f7Fnp5YAXPNABJuEYPnPWT6AAqB Psmwqts7fVbbm3PCqpXU2HzeiEpzmUbxeiIgHwKwi79Z/WkLL2LORJFVvSNoCMiC6sVN 3VPDV7oMT5BBi1bdk5OxeysfC7sqco+jtmLX52ewF/BevXBIHB6fEstHMGRwjjQFI+K6 4/NR4Fq0JoqAvk6W3uM7I+B+XmHU6jYSuma4GkWr1VUZOAQ5kcgQMA30+khyt0Ilq/Hg nRTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E8Dmtv81; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63802-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63802-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWBSGs5SoGKQSGmWxF7AORDXTb7NPlXvBlcvZA4o/mJrTyoPnlp6GuGuaj0BKe+Lq+Z3rEBKxFPgSjcBl0/rEwoqVnJuF2xufjG2DygKA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gn38-20020a1709070d2600b00a3cfc0286b5si813343ejc.420.2024.02.13.07.28.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 07:28:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63802-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=E8Dmtv81; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63802-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63802-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 5A0191F24DE5 for ; Tue, 13 Feb 2024 15:28:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3076D5EE72; Tue, 13 Feb 2024 15:28:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="E8Dmtv81" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 568C05DF22; Tue, 13 Feb 2024 15:28:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707838117; cv=none; b=XiCpCy8r+6gMmY56UDW1lediErcK19EKJX5IPTqPcdXzK2hhwLJSsagP8Ho32nKYaNOLpNAXIEKoVxzfAgq0wAgy92dz5ZKohNPmxNbXWEQF+2uhaijsHns7/XOuKOKtT7ufDm6roOk30xcGni7DTGB0lfx2VTM28ldKJDYGvxY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707838117; c=relaxed/simple; bh=fXFCmah43C9aMIn+5teU6Cd/edZQCfiYfF89jrIEcqg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GxRcHIkuX23Lg9FmFn4VWIop22Zb7xaApY4saXnSgZ+1/zmmIugwxc5Epf5cYP3voWK6xoi6Y6vb9qEp3tCDnM8E3UEj5V35GEEdABhYOiVwt6vJR31SlqrtKMatr1SyYquksRTKvkajkq1hGs6BpsShVYZ6hXJM+Gl6cgbnqVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=E8Dmtv81; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED22EC433C7; Tue, 13 Feb 2024 15:28:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707838116; bh=fXFCmah43C9aMIn+5teU6Cd/edZQCfiYfF89jrIEcqg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E8Dmtv81ZcP76/zSKrbRvU33+SY/N/PJY4WzV8EW5uVFBNPqsgkJOgPd9bTm96C64 qPaAueqNdetNygWN4sruZd9Z8lbXrIVCSK+wNzfaX0Z+ngt2bGEtAPGbreSHdSm804 xTXtCB/1xKGcbw44vNsmR0VYXQOYZ2unnqxZiEakTev2dgKjjssnP3TvVNisiut/xM dLBcLI5FqYhtlOX/BiC1wrNuKyYakSfRTkFuQJBj6ZkeRULfI+5JXoab5kRDamm8X8 WwSKGh1vh7owfMC9O3Wq+DAGPr1vuaJAeMaBGtmhn+ew3l1b05CZNuleQ6ykCqWchS CD4Y5yvrAu8OQ== Date: Tue, 13 Feb 2024 15:28:31 +0000 From: Mark Brown To: Tudor Ambarus Cc: =?iso-8859-1?Q?Th=E9o?= Lebrun , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Dhruva Gole , Gregory CLEMENT , Vladimir Kondratiev , Thomas Petazzoni , Tawfik Bayouk Subject: Re: [PATCH] spi: spi-mem: add statistics support to ->exec_op() calls Message-ID: <69f023bb-2844-496f-9f3f-4e2e80129d33@sirena.org.uk> References: <20240209-spi-mem-stats-v1-1-dd1a422fc015@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MMftTTIZEnYjxm6P" Content-Disposition: inline In-Reply-To: X-Cookie: Does not include installation. --MMftTTIZEnYjxm6P Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 13, 2024 at 12:39:02PM +0000, Tudor Ambarus wrote: > On 2/9/24 13:51, Th=E9o Lebrun wrote: > > + if (!ret || ret !=3D -ENOTSUPP || ret !=3D -EOPNOTSUPP) { > > + spi_mem_add_op_stats(ctlr->pcpu_statistics, op, ret); > > + spi_mem_add_op_stats(mem->spi->pcpu_statistics, op, ret); > > + > Would be good to be able to opt out the statistics if one wants it. > SPI NORs can write with a single write op maximum page_size bytes, which > is typically 256 bytes. And since there are SPI NORs that can run at 400 > MHz, I guess some performance penalty shouldn't be excluded. If we can cope with this sort of statistics collection in the networking fast path we can probably cope with it for SPI too, the immediate recording is all per CPU so I'd like to see some numbers showing that it's a problem before worrying about it too much. Even the people doing things like saturating CAN buses haven't been raising it as a concern for the regular SPI data path. We could add a Kconfig if it's an issue. --MMftTTIZEnYjxm6P Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmXLip8ACgkQJNaLcl1U h9CTjQf/axznzzZjRR5HlbP310cOtEp7gWYv/5Py4bHDmJOsfZSb/gXBo/joMaRC +HlD1aUoSw6g6DTwj6u5pD+8hNqmVOeUoM7Wy8b/xbDMAjZAfxM7W+AbtX+WiO0C UyVGLSvUe4tTDiUJg6xhWQEFG6E8cZl7Sd3/LCcfl7Dy8XM+fQglFdhpnAka5Zqb N6yB5zHdXBsEbAvUEUdwplckFjqecpAKTXSMyy5PlT7sdcgh8SfNszR0w58d6h2d HkgYUQxmn0Q9tEZw569UhoR7i/9y/i+nUVTk51A0Byhh6pB58oQXTLwhm5Q2XABQ vwKjnlRwwfk1sWk5jOz0eG0OiWnhog== =kMnE -----END PGP SIGNATURE----- --MMftTTIZEnYjxm6P--