lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 8 Mar 2021 16:05:04 +0100
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Boqun Feng <boqun.feng@...il.com>
Cc:     Pavel Machek <pavel@....cz>, linux-kernel@...r.kernel.org,
        Andrea Righi <andrea.righi@...onical.com>,
        schuchmann@...leissheimer.de, Dan Murphy <dmurphy@...com>,
        kernel@...gutronix.de, linux-leds@...r.kernel.org
Subject: Re: [PATCH] leds: trigger: fix potential deadlock with libata

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:
> > > 
> > > 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-specific
> > > Transport Protocol) transfer is running. With this patch, we see CAN
> > > frames delayed for ~6ms, the usual gap between CAN frames is 240µs.
> > > 
> > > Reverting this patch, restores the old performance.
> > > 
> > > 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()?
> > > 
> > 
> > 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 ;-)
> > 
> > (While at it, I think maybe we miss the leddev_list_lock in net/mac80211
> > in the patch)
> 
> 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

-- 
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 |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ