Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1818195pxb; Mon, 8 Mar 2021 07:09:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0jl2QR340eJBr1OvY8gfi6O+B92BNNyWy3GfHjiR3uRRDKr92l+svyhrrT/II8tZuPH8x X-Received: by 2002:a05:6402:b85:: with SMTP id cf5mr21452851edb.248.1615216143506; Mon, 08 Mar 2021 07:09:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615216143; cv=none; d=google.com; s=arc-20160816; b=VwRicO3I/ySEKX2gIbMaDxpfC12ibluKZW3kwcly2+rx3Al9K+OHdp9W9b6mwloWHu iw1GcZaBMBmxdJTqAtc8S9mfCb4bNPduBs2mKhgWJ4fPNCa1UaAkAWF9HbtY6gnFBXrl wMwy3KL3Epy3+xUqmxZaQZ78VYdqlbRvX9RekruU+qVRw8Frvr/QF0l+VxrMJWnZHTP7 /uYwAZkx78ylzilhDeW2oEbdeL2w7Yxm9Yw07fiLtSP7yig5tWFeYy2N0VZ1WF/9FkMN I8+CLMofDOtLKSTfCD64rGem3oi1vRE52U8QTu/PFhsf//8thqYI7mX0TAkJe0VkZ9nK R4Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=GDjInZmXZyUwV6Yztu25EXC41w/LSWMoIpMEEEoGiww=; b=Er1OimOkysfR+NBKGcuOxSFq9MclplQBZRscn8jY8mVLZ13lbRBDB4l1VrIZHbOSgx /E1pxgLkUrkCi29t61Oz6i4KEyrRSUav/OT6sn6Wq8YmeSxRTnw2ikNSz+Esl31b3xpj 2hJ9nFCZwOAoTJDxiRHu4RJgT2uFTnI4k1Qgexw0XPRzSxddWSYmho09InpasxALgR2K UySdsBYDA3cg/zZZukmuHTNp5vFuI7K8E9+ywl6WshqyHTtP0LS5iqW4xF4gKhLiCoLV qZLUUR4vHz2W+4eLwHj/Fip3WTqmRpDfkljbnAt6uuMYkBsf52XAB01Qs7V4vOqky+g2 +SqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp12si6788770ejc.526.2021.03.08.07.08.27; Mon, 08 Mar 2021 07:09:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231249AbhCHPFe (ORCPT + 99 others); Mon, 8 Mar 2021 10:05:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229972AbhCHPFL (ORCPT ); Mon, 8 Mar 2021 10:05:11 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B10B3C06174A for ; Mon, 8 Mar 2021 07:05:10 -0800 (PST) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJHRT-0005r4-AZ; Mon, 08 Mar 2021 16:05:07 +0100 Received: from pengutronix.de (unknown [IPv6:2a03:f580:87bc:d400:743f:a98a:1069:4286]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id D9DDC5F0CDB; Mon, 8 Mar 2021 15:05:05 +0000 (UTC) Date: Mon, 8 Mar 2021 16:05:04 +0100 From: Marc Kleine-Budde To: Boqun Feng Cc: Pavel Machek , linux-kernel@vger.kernel.org, Andrea Righi , schuchmann@schleissheimer.de, Dan Murphy , kernel@pengutronix.de, linux-leds@vger.kernel.org Subject: Re: [PATCH] leds: trigger: fix potential deadlock with libata Message-ID: <20210308150504.dwhgqb5tyy2a3r2p@pengutronix.de> References: <20201102104152.GG9930@xps-13-7390> <20210306203954.ya5oqgkdalcw45c4@pengutronix.de> <20210308145653.mechsganlrvpzyym@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7ryudos4mz2elpwz" Content-Disposition: inline In-Reply-To: <20210308145653.mechsganlrvpzyym@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --7ryudos4mz2elpwz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 08.03.2021 15:56:53, Marc Kleine-Budde wrote: > > > meanwhile this patch hit v5.10.x stable and caused a performance > > > degradation on our use case: > > >=20 > > > It's an embedded ARM system, 4x Cortex A53, with an SPI attached CAN > > > controller. CAN stands for Controller Area Network and here used to > > > connect to some automotive equipment. Over CAN an ISOTP (a CAN-specif= ic > > > Transport Protocol) transfer is running. With this patch, we see CAN > > > frames delayed for ~6ms, the usual gap between CAN frames is 240=C2= =B5s. > > >=20 > > > Reverting this patch, restores the old performance. > > >=20 > > > What is the best way to solve this dilemma? Identify the critical path > > > in our use case? Is there a way we can get around the irqsave in > > > led_trigger_event()? > > >=20 > >=20 > > Probably, we can change from rwlock to rcu here, POC code as follow, > > only compile tested. Marc, could you see whether this help the > > performance on your platform? Please note that I haven't test it in a > > running kernel and I'm not that familir with led subsystem, so use it > > with caution ;-) > >=20 > > (While at it, I think maybe we miss the leddev_list_lock in net/mac80211 > > in the patch) >=20 > I can confirm, this patch basically restores the old performance. Hmmm - it first looked OK, now it doesn't - let me do some better testing. Sorry for the noise, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --7ryudos4mz2elpwz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmBGPR4ACgkQqclaivrt 76lKkwf9FO+DA3+uWtrcDKg9efp/7Mv4mlUeSpxbao5ClgeraJNsLTyM6CG+mNE6 uLbyz3mj7ikKX8NknLIPOHdnmtKRfSUFTrYmGSRqnqn7obIFrMb64CV5LMLE+ghN qr+aoOUdAfC6sV6GVj6dOQnlmVp0Y64QQ0KuwFkyzhVujdAPr2ERVKLb4jySG7ML 8wo0A9J1ArWeXGwfoPS2do8giajTM23xhIQFCWefwK9aDGM69qMrVrRzgwt8v1hx TszYt8jJh2Dku73BMoj4K+VPmONWCWUZ1nWlV4m4o3Q/KT6zkwIwwyzpCiAgG0rh wjM/RBt+p27/2qExon1PiB+qRoHZtA== =ca2G -----END PGP SIGNATURE----- --7ryudos4mz2elpwz--