Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbdF0APn (ORCPT ); Mon, 26 Jun 2017 20:15:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:49473 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751440AbdF0APi (ORCPT ); Mon, 26 Jun 2017 20:15:38 -0400 Date: Tue, 27 Jun 2017 02:15:34 +0200 From: "Luis R. Rodriguez" To: Linus Torvalds Cc: "Luis R. Rodriguez" , Thomas Gleixner , Peter Zijlstra , 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: <20170627001534.GK21846@wotan.suse.de> References: <20170623233702.20564-1-jakub.kicinski@netronome.com> <20170626233030.GI21846@wotan.suse.de> 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: 1593 Lines: 41 On Mon, Jun 26, 2017 at 04:43:10PM -0700, Linus Torvalds wrote: > The swait interface is so special and so undocumented, that I really > didn't expect anybody to even know about it unless they had very > specific needs, much less use it. If swait is really not designed and intended to be used for cases that do not require all the bells and whistles of wait, and is just very special-case, a nice big warning about it seems appropriate on swait.h, instead of the welcoming open armed, "One would recommend using this wait queue where possible". >From d751201aebf7ca8acb765284a9017a711ddbe791 Mon Sep 17 00:00:00 2001 From: "Luis R. Rodriguez" Date: Mon, 26 Jun 2017 17:06:10 -0700 Subject: [PATCH] swait: annotate swait's special use Before kernel hipsters start thinking swait is the cool thing to do. Signed-off-by: Luis R. Rodriguez --- include/linux/swait.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/swait.h b/include/linux/swait.h index 4a4e180d0a35..14fcf23cece4 100644 --- a/include/linux/swait.h +++ b/include/linux/swait.h @@ -29,7 +29,10 @@ * * As a side effect of this; the data structures are slimmer. * - * One would recommend using this wait queue where possible. + * NOTE: swait is for cases of extreme memory considerations and some very + * special realtime issues, where it saves a couple of bytes in structures that + * need close packing. As such its very special-use. Consider using regular + * waits queues from wait.h instead *first*. */ struct task_struct; -- 2.11.0