From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00718C433E0 for ; Mon, 8 Jun 2020 11:28:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C786F2076A for ; Mon, 8 Jun 2020 11:28:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591615723; bh=YYeYKTubuK8uMi7Ksz+Evqk5yKQweEpTz0M3eAYB77A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=iURANVx+bwiYD/LpZe037TFTeug0CJGQb5JyW6ZoMtHmeWFR7jKG5RzdBfignOr8o ZXDDhGdzTlDuJNENbjprNeN9M1V3HyAbiaM87mC0AadDBfrSA91UpI4CBjJMzBdAoN 5m75Tp9oAzOlC0mUH7GaOevhhh2N/sp9Ae6b0ReA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729549AbgFHL2n (ORCPT ); Mon, 8 Jun 2020 07:28:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:38976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729310AbgFHL2n (ORCPT ); Mon, 8 Jun 2020 07:28:43 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 06725206C3; Mon, 8 Jun 2020 11:28:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591615722; bh=YYeYKTubuK8uMi7Ksz+Evqk5yKQweEpTz0M3eAYB77A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PSssz0ftDvak2V1jNm/rzjE+e3b8E5DOT4ArB6KH14YgxL9PCjBbkPYWE8eSyESxe HepGmVKPZIJj9kL9YwUIaPoveXgvhY9UdwnMctjrGkzYwv/Tu1YFc+cPW2+jw9jniL oEXhLw2diniklq+QavDjLkejFy7X/SGrDRlF51yI= Date: Mon, 8 Jun 2020 12:28:40 +0100 From: Mark Brown To: Robin Murphy Cc: Florian Fainelli , lukas@wunner.de, "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, "open list:SPI SUBSYSTEM" , Rob Herring , "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Martin Sperl , Nicolas Saenz Julienne Subject: Re: [PATCH v2] spi: bcm2835: Enable shared interrupt support Message-ID: <20200608112840.GC4593@sirena.org.uk> References: <20200604212819.715-1-f.fainelli@gmail.com> <142d48ae-2725-1368-3e11-658449662371@arm.com> <20200605132037.GF5413@sirena.org.uk> <2e371a32-fb52-03a2-82e4-5733d9f139cc@arm.com> <06342e88-e130-ad7a-9f97-94f09156f868@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hYooF8G/hrfVAmum" Content-Disposition: inline In-Reply-To: X-Cookie: I'm rated PG-34!! User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org --hYooF8G/hrfVAmum Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 08, 2020 at 12:11:11PM +0100, Robin Murphy wrote: > Again, 2 cycles. The overhead of a static key alone is at least 50% of that. > And that's not even considering whether the change in code layout caused by > doubling up the IRQ handler might affect I-cache or branch predictor > behaviour, where a single miss stands to more than wipe out any perceived > saving. And all in code that has at least one obvious inefficiency left on > the table either way. > This thread truly epitomises Knuth's "premature optimisation" quote... ;) In fairness the main reason this driver is so heavily tuned already (and has lead to some really nice improvements in the core) is that there are a number of users hitting 100% CPU utilization driving SPI devices on some of the older RPi hardware, IIRC around IIO type applications mostly. I do tend to agree that this particular optimization is a bit marginal but there has been a lot of effort put into this. --hYooF8G/hrfVAmum Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl7eIOcACgkQJNaLcl1U h9De6wf9HKTAjmkja1i1t3bz0jmsUYY8xaAjvc0kqwlkowJdSjfUHX/0ahbBtdkn 2/kzIAPvx4B0oTHNyL3hNwMWo8hEGNhRQXwZeJjeR2MJREW6qqOXooWyFCDMJq/z R1W/rcSbLvGORXBiiFFhpBLEiY5rRRTZXNqw4An12tduk05ZOmpqVdKvCal0i48B UZ0u1AIdNOmauU8JnlhygidT3ErLH4EIFirK04AhVs8ZFVmKOvfTWzHR/zUXHzdD MWXKAFJcfcywFnWlqq4yeRpPFbu+c7/Ko4MJZNSpEViAzDUo7wy5SyDP4mXmC+tI BB0LR91M/J64eJtjSEN8MMW3rGEzwQ== =CMzm -----END PGP SIGNATURE----- --hYooF8G/hrfVAmum-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36084C433E0 for ; Mon, 8 Jun 2020 11:28:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E9FAF2076A for ; Mon, 8 Jun 2020 11:28:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V27Xrd5k"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="PSssz0ft" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9FAF2076A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IyaZIuPTwDXIbQHt2B2NLOheiTAWnX+8tbnJypJOCVY=; b=V27Xrd5kPBhL4iajR3ts79iwW tTmNt/mkQ0i5wDdKJfFbZIB+ByjLDGd9ehJHHECtPZb2QRpmOa39/j6h1Fh6xQy3kFiNY3fXv+EgH fyZ60JbZ0Dy1oMAX05xvVvA0S8czDHXZ9G6fJk5QeCXUS0MHToZF6dmHSCDnpQpWYZVswnUpnWD0G dE6IJc+hCJ7Rtn0GFVWMEpEZNIb80hsNZUWQGoaRbHhmapUCa0rL9VazQGV0kvqS5fEUb3H7Fe2Hp Kn9yN18o6KKM+j7+S92oP4NBeYnpsLKYWtfuEeJzFZFFrgPd/hUBUnuDGQmhey4sQXOziEPerSXr6 FijUv//iw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jiFxN-0004N3-UY; Mon, 08 Jun 2020 11:28:45 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jiFxK-0004Md-Sp; Mon, 08 Jun 2020 11:28:44 +0000 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 06725206C3; Mon, 8 Jun 2020 11:28:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591615722; bh=YYeYKTubuK8uMi7Ksz+Evqk5yKQweEpTz0M3eAYB77A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PSssz0ftDvak2V1jNm/rzjE+e3b8E5DOT4ArB6KH14YgxL9PCjBbkPYWE8eSyESxe HepGmVKPZIJj9kL9YwUIaPoveXgvhY9UdwnMctjrGkzYwv/Tu1YFc+cPW2+jw9jniL oEXhLw2diniklq+QavDjLkejFy7X/SGrDRlF51yI= Date: Mon, 8 Jun 2020 12:28:40 +0100 From: Mark Brown To: Robin Murphy Subject: Re: [PATCH v2] spi: bcm2835: Enable shared interrupt support Message-ID: <20200608112840.GC4593@sirena.org.uk> References: <20200604212819.715-1-f.fainelli@gmail.com> <142d48ae-2725-1368-3e11-658449662371@arm.com> <20200605132037.GF5413@sirena.org.uk> <2e371a32-fb52-03a2-82e4-5733d9f139cc@arm.com> <06342e88-e130-ad7a-9f97-94f09156f868@arm.com> MIME-Version: 1.0 In-Reply-To: X-Cookie: I'm rated PG-34!! User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200608_042842_952947_E0CAE95D X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Florian Fainelli , Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, Rob Herring , "open list:SPI SUBSYSTEM" , Nicolas Saenz Julienne , lukas@wunner.de, "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , Martin Sperl , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" Content-Type: multipart/mixed; boundary="===============3379190191588297883==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============3379190191588297883== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hYooF8G/hrfVAmum" Content-Disposition: inline --hYooF8G/hrfVAmum Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 08, 2020 at 12:11:11PM +0100, Robin Murphy wrote: > Again, 2 cycles. The overhead of a static key alone is at least 50% of that. > And that's not even considering whether the change in code layout caused by > doubling up the IRQ handler might affect I-cache or branch predictor > behaviour, where a single miss stands to more than wipe out any perceived > saving. And all in code that has at least one obvious inefficiency left on > the table either way. > This thread truly epitomises Knuth's "premature optimisation" quote... ;) In fairness the main reason this driver is so heavily tuned already (and has lead to some really nice improvements in the core) is that there are a number of users hitting 100% CPU utilization driving SPI devices on some of the older RPi hardware, IIRC around IIO type applications mostly. I do tend to agree that this particular optimization is a bit marginal but there has been a lot of effort put into this. --hYooF8G/hrfVAmum Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl7eIOcACgkQJNaLcl1U h9De6wf9HKTAjmkja1i1t3bz0jmsUYY8xaAjvc0kqwlkowJdSjfUHX/0ahbBtdkn 2/kzIAPvx4B0oTHNyL3hNwMWo8hEGNhRQXwZeJjeR2MJREW6qqOXooWyFCDMJq/z R1W/rcSbLvGORXBiiFFhpBLEiY5rRRTZXNqw4An12tduk05ZOmpqVdKvCal0i48B UZ0u1AIdNOmauU8JnlhygidT3ErLH4EIFirK04AhVs8ZFVmKOvfTWzHR/zUXHzdD MWXKAFJcfcywFnWlqq4yeRpPFbu+c7/Ko4MJZNSpEViAzDUo7wy5SyDP4mXmC+tI BB0LR91M/J64eJtjSEN8MMW3rGEzwQ== =CMzm -----END PGP SIGNATURE----- --hYooF8G/hrfVAmum-- --===============3379190191588297883== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============3379190191588297883==--