Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753205AbdGLSpZ (ORCPT ); Wed, 12 Jul 2017 14:45:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:52435 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751075AbdGLSpX (ORCPT ); Wed, 12 Jul 2017 14:45:23 -0400 Date: Wed, 12 Jul 2017 20:45:19 +0200 From: "Luis R. Rodriguez" To: Linus Torvalds Cc: Peter Zijlstra , "Luis R. Rodriguez" , Thomas Gleixner , DanielWagnerwagi@monom.org, Boqun Feng , Marcelo Tosatti , Paul Gortmaker , Ming Lei , "Li, Yi" , "AKASHI, Takahiro" , Jakub Kicinski , Greg Kroah-Hartman , "Paul E. McKenney" , Davidlohr Bueso , Linux Kernel Mailing List , "Eric W. Biederman" , Petr Mladek , Andrew Lutomirski , Kees Cook , David Howells , Alan Cox , "Theodore Ts'o" , oss-drivers@netronome.com Subject: Re: [PATCH] firmware: wake all waiters Message-ID: <20170712184519.GV21846@wotan.suse.de> References: <20170623233702.20564-1-jakub.kicinski@netronome.com> <20170626233030.GI21846@wotan.suse.de> <20170705161800.wnrrbgpxsrtltxxc@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1642 Lines: 35 On Wed, Jul 05, 2017 at 09:33:38AM -0700, Linus Torvalds wrote: > On Wed, Jul 5, 2017 at 9:18 AM, Peter Zijlstra wrote: > > In any case, I'm not seeing why you call it idiotic. > > Have you read the problems? > > There were originally three users: > > - one of them is firmware loading, and it was actively *buggy* due to > using hat shit interface, and it's going away To be fair the issue with the firmware loading was due to a regression on the port from using swait/completion to swait. swake_up() was used instead of swake_up_all(). Before the port complate_all() was used instead of just complete(). So I would personally not add the firmware API to the list of reasons why swait would be crap. The more *general* semantics issue you pointed out with swake_up() though seem more reasonable to be attacking the swait API and those are best followed on the other thread [0]. I should also point out that there are *other* issues with the firmware API on this whole wait stuff, but that have been present since even before when we were using the regular wait / completion API -- a wake was never issued upon an error in some situations on some kernel builds. I have a fix for that now along with a test case for it which I'll post soon. After all these fixes the code works as expected with either the swait API or the good 'ol wait/completion API. But given swait is still out by you as only specialized I did already post patches to revert the firmware API to switch back to the wait/completion API. [0] https://lkml.kernel.org/r/CA+55aFykNULx-b6M6FmUYdK2cn-OJKKfjaPwLN5xZGK+bioGaA@mail.gmail.com Luis