From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ahmad Fatoum Subject: Re: [BUG] pfifo_fast may cause out-of-order CAN frame transmission Date: Fri, 14 Feb 2020 17:03:27 +0100 Message-ID: References: <661cc33a-5f65-2769-cc1a-65791cb4b131@pengutronix.de> <7717e4470f6881bbc92645c72ad7f6ec71360796.camel@redhat.com> <779d3346-0344-9064-15d5-4d565647a556@pengutronix.de> <1b70f56b72943bf5dfd2813565373e8c1b639c31.camel@redhat.com> <53ce1ab4-3346-2367-8aa5-85a89f6897ec@pengutronix.de> <57a2352dfc442ea2aa9cd653f8e09db277bf67c7.camel@redhat.com> <13e8950e8537e549f6afb6e254ec75a7462ce648.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <13e8950e8537e549f6afb6e254ec75a7462ce648.camel@redhat.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org To: Paolo Abeni , netdev@vger.kernel.org, linux-can@vger.kernel.org, Pengutronix Kernel Team List-Id: linux-can.vger.kernel.org Hello Paolo, On 2/6/20 2:21 PM, Paolo Abeni wrote: > On Tue, 2020-02-04 at 17:25 +0100, Ahmad Fatoum wrote: >> Hello Paolo, >> >> On 1/20/20 5:06 PM, Ahmad Fatoum wrote: >>> Hello Paolo, >>> >>> On 1/16/20 1:40 PM, Paolo Abeni wrote: >>>> I'm sorry for this trial & error experience. I tried to reproduce the >>>> issue on top of the vcan virtual device, but it looks like it requires >>>> the timing imposed by a real device, and it's missing here (TL;DR: I >>>> can't reproduce the issue locally). >>> >>> No worries. I don't mind testing. >>> >>>> Code wise, the 2nd patch closed a possible race, but it dumbly re- >>>> opened the one addressed by the first attempt - the 'empty' field must >>>> be cleared prior to the trylock operation, or we may end-up with such >>>> field set and the queue not empty. >>>> >>>> So, could you please try the following code? >>> >>> Unfortunately, I still see observe reodering. >> >> Any news? > > I'm unable to find any better solution than a revert. That will cost > some small performace regression, so I'm a bit reluctant to go ahead. > If there is agreement I can post the revert. Could you draft the revert? d518d2ed864 ("net/sched: fix race between deactivation and dequeue for NOLOCK qdisc") looks applicable even with the revert, so I don't want to inadvertently cause a regression by wrongly reverting. Cheers Ahmad > > Cheers, > > Paolo > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |