Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751887AbdGEQdl (ORCPT ); Wed, 5 Jul 2017 12:33:41 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:34314 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751664AbdGEQdj (ORCPT ); Wed, 5 Jul 2017 12:33:39 -0400 MIME-Version: 1.0 In-Reply-To: <20170705161800.wnrrbgpxsrtltxxc@hirez.programming.kicks-ass.net> References: <20170623233702.20564-1-jakub.kicinski@netronome.com> <20170626233030.GI21846@wotan.suse.de> <20170705161800.wnrrbgpxsrtltxxc@hirez.programming.kicks-ass.net> From: Linus Torvalds Date: Wed, 5 Jul 2017 09:33:38 -0700 X-Google-Sender-Auth: wp8kwPXgT1NIJWRFooVJz_d8-CY Message-ID: Subject: Re: [PATCH] firmware: wake all waiters To: Peter Zijlstra Cc: "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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1625 Lines: 48 On Wed, Jul 5, 2017 at 9:18 AM, Peter Zijlstra wrote: > > So swait should be capable of most things people want from a waitqueue. But what's the point? Regular wait-queues work fine. The advantages of swait aren't huge even if you fix the crap it does now. And the disadvantages of "another interface to do the same thing" are big indeed. Keep it specialized. > Right, so we need the raw_spinlock in order to run from non-preemptible > code on RT. And we then also need bounded runtimes on stuff. > > The only function which is affected by that is swake_up_all(), No. The fact is, "swake_up()" needs to do that "wake up all" for this interface to be even *REMOTELY* acceptable for general use. Seriously. If the regular "swake_up()" doesn't do what people expect from a wakeup, then it damn well should not be used, and not be taught to people. It's a very specialized interface for only two users, and right now it looks like one of those two users shouldn't have used it in the first place. > 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 - one of them is kvm, and for kvm that interface was shit. - the final one is RCU, and even there it is very questionable. There is no question: swait() is a mistake and should not be used. And you're apparently still in denial about how completely broken it is to have "swake_up()" have different semantics from "swake_up_all()". Linus