Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752892AbdGGW2G (ORCPT ); Fri, 7 Jul 2017 18:28:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:58613 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750882AbdGGW2D (ORCPT ); Fri, 7 Jul 2017 18:28:03 -0400 Date: Fri, 7 Jul 2017 15:27:35 -0700 From: Davidlohr Bueso To: Linus Torvalds Cc: Thomas Gleixner , Greg KH , "Luis R. Rodriguez" , Martin Fuzzey , "Eric W. Biederman" , Dmitry Torokhov , Daniel Wagner , David Woodhouse , jewalt@lgsinnovations.com, Rafa?? Mi??ecki , Arend Van Spriel , "Rafael J. Wysocki" , "Li, Yi" , atull@kernel.org, Moritz Fischer , Petr Mladek , Johannes Berg , Emmanuel Grumbach , "Coelho, Luciano" , Kalle Valo , Andrew Lutomirski , Kees Cook , "AKASHI, Takahiro" , David Howells , Peter Jones , Hans de Goede , Alan Cox , "Theodore Ts'o" , Michael Kerrisk , Paul Gortmaker , Marcelo Tosatti , Matthew Wilcox , Linux API , linux-fsdevel , Linux Kernel Mailing List , "stable # 4 . 6" Subject: Re: [PATCH 2/4] swait: add the missing killable swaits Message-ID: <20170707222735.GC30414@linux-80c1.suse> References: <20170629125402.GH26046@kroah.com> <20170629133530.GA14747@kroah.com> <20170629174046.GC3954@linux-80c1.suse> <20170629183339.GD3954@linux-80c1.suse> <20170705020635.GD11168@linux-80c1.suse> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1596 Lines: 52 On Fri, 07 Jul 2017, Linus Torvalds wrote: >On Tue, Jul 4, 2017 at 7:06 PM, Davidlohr Bueso wrote: >> >> So here's something that boots and builds a kernel. Any thoughts? > >This patch ios just nasty crap. Sorry. > >It has random whitespace changfes that look entirely unrelated to trhe >actual real meat of the patch, and that actually make whitespace >*worse*. Ok sorry, fwiw those were 80-line fixlets I thought were trivial enough to just fly by. > >WHY? > >That alone should just mean that this patch needs to be thrown away >and never ever looked at again. > >But also, this is fundamentally garbage. > >Exactly for the same reasons that the swait interfaces were >fundamentally broken. > >It *looks* like it works on regular wait queues, and people can start >using it that way, but it actually doesn't have the right semantics at >all. > >The new "lockless" function ONLY works if you don't have a private >wakeup function. Oh indeed, this was always my intent. Going back to the patch, when checking DEFINE_WAIT_FUNC I clearly overlooked the ->func() implications, breaking all kinds of semantics. With that and the constraints aforementioned in the patch, I see no sane way of using wake_qs. > >So no, this is not only NAK'ed, the whole approach is pure and utter >shit and this needs to be buried deep and forgotten about so that it >never ever comes back to life. Given that you seem to agree that the lockless version is possible as long as we keep semantics, this imho is another point for some form of simplified waitqueues. But yeah. Thanks, Davidlohr