Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp405753rdh; Tue, 13 Feb 2024 23:43:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVWu5DLfVjKpgSoKysqbakzwXKYRffK45Y0DU5N6/f9b+n+6xIXDdmJFDIuKbrk3aNYwDmxqLOPWE3hnHcMi+LIE293nQZrE/DGbTiNaw== X-Google-Smtp-Source: AGHT+IEUlMQKO8zZlwkerDsHMmyCj9zlX/jlrK2JyiGW6sf3+UrB4WFuDRhnUqiyoaDyyBBzCrvB X-Received: by 2002:a05:6870:b4aa:b0:218:df68:87b2 with SMTP id y42-20020a056870b4aa00b00218df6887b2mr1819498oap.44.1707896597250; Tue, 13 Feb 2024 23:43:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707896597; cv=pass; d=google.com; s=arc-20160816; b=ekqEpTtXiqVa4JhX4CTV4b0H6IPvRcBVecpWmhKTgsGqP+yIXkpjCRalR0MOs4jlFu pSPnphP5tOTYXgvp9jSs4DslAxPf8K+6PLDvo1FS743SzMeElUwjapsOuH3CglenIquM VrgPZiYBJFQWIjwKjJPAEfUjKFrW3/QII5eCRj9XvEY6sYJDffnarYH/PLn3YivQq82L dAQdFO1ax6k7NgdY19q9Q1wrovIDf1amJGdxBnrUvyib+oP6qEsMLNRHfZpkxnV3msJj wPq2s1gnxacqbz8CUue96aa+BZrBsG4jFF3Bosm7i+YQjAN7KvGy25rdcjz47TXJKB+M hTUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Qm35U4zALwNw8pnZRUH8OtgtOhB7/DRacCD6hYwcr6s=; fh=uUusLF9wFli4ZxnuS/+VuUz3ZMCVKu0bT86Qo2FifN4=; b=oDV+a5mHpzqi+roIKwJ5qAANh3vSF9uDYbH1HZAKpPXtcY01jIbKNlRa4NKnsz7Vad YTzJixDIlm+6WqFnroPsv8r0OPJ3Gz69RbpCTeb7bUJ624I7JIszKELY46NAk2IAjBSJ ZQ5VL4HAN+h23+7dkrc5x8W50bsidZnuMxWmXPWTDBiGHaWe2ux20DHKYk2+Glu4cD4d JUbEzcmaG7xGdcV7ENG/s0qu4cYFqU2v3Wp6aZTywsmBste21143QOW16CDkfCrDwmJU GwDN6u5Uut36Q86d0mH4wxO4bQvC4BcGKYu2cPJgteTp14ZSJ9SlqsWIyZ1rWGnJKpX3 9LgA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i0+dNpg4; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-64841-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCUXbUGOxldrwvMPmUQykZxRhS95CB/MbBRdPR/8ovcgSu6Vop7/VzV370dF3MAu4qBEDtFuz5TqC30dmpYqUMrbL4HkEVjIglfO6lLhlw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id x22-20020a656ab6000000b005dc858b5b75si2370163pgu.848.2024.02.13.23.43.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 23:43:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64841-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i0+dNpg4; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-64841-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2C8D9B20E38 for ; Wed, 14 Feb 2024 07:43:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 19C861171A; Wed, 14 Feb 2024 07:43:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="i0+dNpg4" Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73438125A3 for ; Wed, 14 Feb 2024 07:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707896586; cv=none; b=EaAGH4E5SPX33PvdI+lV1/59pK97yn8pc6bVXFbyDlmX+dXkflVBn/Tgwqj/YjoT75W1a/RJMmkv0qwjAhqe9/LkxBQLzHB5Ns3vrA+59LrmDhRmOxMPAN58qixUv6sevnO1NTjc+a33JVvcjrZPIEeBIohyMAvpoelUrhhGnGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707896586; c=relaxed/simple; bh=VWEOVPjzwG5LyVakYdf3057OxZUScV4IOC88KiJYLM0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=MRgTp2XJLoAwNpZWGwD/fVoY/tnChkSXkbStrhRJ8x/cs3DOSmRJqyhe+tTVBOPr5QePt8Lh1wYDCy7FDqYYGWHV4DV45tdsG2Jdff9BESCZ7pM0QoAfUUFg+8t8zGETvqOHiPAjA8duh3ZfJmABavTJ75F4bImDaRKt2APykek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=i0+dNpg4; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2d11d180652so1648811fa.2 for ; Tue, 13 Feb 2024 23:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707896582; x=1708501382; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Qm35U4zALwNw8pnZRUH8OtgtOhB7/DRacCD6hYwcr6s=; b=i0+dNpg4+lo1JHLpmJDwvRh6w8H5ra71CjQy3kIEHaRhKePq1hCYhxuZ3hK+5cBFxo BRbi55RLs0LwK/3t4DYeKMf5qJeuyvM5vQGoIcAzVbjIAJNLE9FqOizQzYeSOVBS6DYP KKL7l61ZgzngMfJEAbciAUVBzjykfRuxbSJKkC13R8ScHD/dvjjIxltAl5O1PUTgL5SN IX8NziLLYbEYDYWBGPl0Ymn/3XsKLY0cwRS0uZzu/SfkvTK/BxwQFyREMnQFA45Lwu2F yCiT0hx4kqsxgfDXkjlzOggoUvexfX4pElxwEx2V3Tcj37llgDFU0whPRUVZLb5nSYK8 1HkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707896582; x=1708501382; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Qm35U4zALwNw8pnZRUH8OtgtOhB7/DRacCD6hYwcr6s=; b=HPR+eIEqNYAOcu0yLhbKswv33YJmToONSPqQ8+uAd1QnKZCuiQVy1dhna0gqly9M80 +VPXw1vffnIGAD8iVLjuISorDkol8X3CS8oFsz98zFmG+XjnviCHRvfgWlrLYSbwvIOk EGV4qrn2KDqpWQodG3EhyxkbdZOM4h/3/NTZus34nIA8VXdiKNYcFpXAjopgpeYgAP0w ytEZh05Zfsh+bWo5qQPXsAhGCg8lxIBElj2Ji8MIQEdNXhqCXk9VxO+79DNMyrogjee7 WaxKa+ffq/AN4p6nttA1M71K1DWbm6it69/OyDgEp1okmwxnaEI6XkqDTl1NRtndjgyp YKwA== X-Forwarded-Encrypted: i=1; AJvYcCWxaE5oBw0XE5Oe26HEC9TZU53mPoatJW8MF3Oa2CmGXYRjn1kOV4mHasLPRboLvyI/CisL+7NX8oxYeDuxBkFvDJ7RwvdiyluZ3HX9 X-Gm-Message-State: AOJu0YyFmXsCBDGhD8yCYgRioVA9np+mpRehOBR/eysvD1gkzJeoJTgB qrkS7XzjXjcI4Z5S28OaT6kz5Sxv9zLbaTjmpMrwt0RH5Sn3hUnBjm9U6fb/B1g= X-Received: by 2002:a2e:82c3:0:b0:2d0:ac7f:eef9 with SMTP id n3-20020a2e82c3000000b002d0ac7feef9mr1312036ljh.34.1707896582368; Tue, 13 Feb 2024 23:43:02 -0800 (PST) Received: from [192.168.2.107] ([79.115.63.202]) by smtp.gmail.com with ESMTPSA id x17-20020a05600c21d100b00410b98a5c77sm1059749wmj.32.2024.02.13.23.43.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Feb 2024 23:43:01 -0800 (PST) Message-ID: Date: Wed, 14 Feb 2024 07:42:57 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] spi: spi-mem: add statistics support to ->exec_op() calls Content-Language: en-US To: Mark Brown Cc: =?UTF-8?Q?Th=C3=A9o_Lebrun?= , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Dhruva Gole , Gregory CLEMENT , Vladimir Kondratiev , Thomas Petazzoni , Tawfik Bayouk References: <20240209-spi-mem-stats-v1-1-dd1a422fc015@bootlin.com> <69f023bb-2844-496f-9f3f-4e2e80129d33@sirena.org.uk> From: Tudor Ambarus In-Reply-To: <69f023bb-2844-496f-9f3f-4e2e80129d33@sirena.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2/13/24 15:28, Mark Brown wrote: > On Tue, Feb 13, 2024 at 12:39:02PM +0000, Tudor Ambarus wrote: >> On 2/9/24 13:51, Théo Lebrun wrote: > >>> + if (!ret || ret != -ENOTSUPP || ret != -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. Ok, we can deal with it afterwards if it'll become an issue.