From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 103D9C2BA19 for ; Wed, 15 Apr 2020 13:20:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CBDB62078B for ; Wed, 15 Apr 2020 13:20:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBDB62078B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6FE158E001D; Wed, 15 Apr 2020 09:20:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6AD9A8E0001; Wed, 15 Apr 2020 09:20:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5C44E8E001D; Wed, 15 Apr 2020 09:20:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0224.hostedemail.com [216.40.44.224]) by kanga.kvack.org (Postfix) with ESMTP id 41C848E0001 for ; Wed, 15 Apr 2020 09:20:23 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id F2E8A4DC1 for ; Wed, 15 Apr 2020 13:20:22 +0000 (UTC) X-FDA: 76710148284.23.print22_77b819b700230 X-HE-Tag: print22_77b819b700230 X-Filterd-Recvd-Size: 3826 Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Apr 2020 13:20:22 +0000 (UTC) Received: by mail-pj1-f68.google.com with SMTP id np9so6755196pjb.4 for ; Wed, 15 Apr 2020 06:20:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RJpmPPEbW5DFD5EOE4e1MFnGEEY0tGlTM0SU0H+OaOw=; b=Ww3reBwJhwqjUto47AIuf3XIT7a+bNQxQDHKq/VH+O/mdCUMo0SGTqhAQd/LT20/gD FXlwCzD1QqQLFcFqursb/Rq40oAnAc65tghy3CnMYHeIBM6D3iEDgaMzvezS1OCJWmkb SJH1rNmGrDTQbcmA0WJvNofCoCFBZ82mk42dCplPoAqSm8Is2F+sgn7T5fp+csds7uj2 Tixam42IA1UBZu2eTeaf1+Bt89DLpQpqy79b+kGt4i6ytGh1XUOQUttz6mHFH1zrNQIB L3hsUa8LLDUhsdIi+o0HqEMvHIVK6ODgddlvmVhAn9WDbwI6/ndPu5pkxnSSWTFPYBNa 1Pzg== X-Gm-Message-State: AGi0PubcCVef04D+imImwke4Od9Y9EzRPdC5HSr9meMkVTMr38VpB27H Nyqsd6Kmo1IgG0ypx/w2Saw= X-Google-Smtp-Source: APiQypJUeYCz7pZivMHyL551WxNhmqBNbGwfbuuxjlm8hRiqy/s1ws3J2v8JSkBdw41jCGt/Xs+WVw== X-Received: by 2002:a17:902:6b07:: with SMTP id o7mr4705177plk.141.1586956821686; Wed, 15 Apr 2020 06:20:21 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id x3sm13521951pfq.95.2020.04.15.06.20.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 06:20:20 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id EF32940277; Wed, 15 Apr 2020 13:20:19 +0000 (UTC) Date: Wed, 15 Apr 2020 13:20:19 +0000 From: Luis Chamberlain To: Christoph Hellwig Cc: axboe@kernel.dk, viro@zeniv.linux.org.uk, bvanassche@acm.org, gregkh@linuxfoundation.org, rostedt@goodmis.org, mingo@redhat.com, jack@suse.cz, ming.lei@redhat.com, nstange@suse.de, akpm@linux-foundation.org, mhocko@suse.com, yukuai3@huawei.com, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Omar Sandoval , Hannes Reinecke , Michal Hocko Subject: Re: [PATCH 5/5] block: revert back to synchronous request_queue removal Message-ID: <20200415132019.GW11244@42.do-not-panic.com> References: <20200414041902.16769-1-mcgrof@kernel.org> <20200414041902.16769-6-mcgrof@kernel.org> <20200414154725.GD25765@infradead.org> <20200414205852.GP11244@42.do-not-panic.com> <20200415064644.GA28112@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200415064644.GA28112@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Apr 14, 2020 at 11:46:44PM -0700, Christoph Hellwig wrote: > On Tue, Apr 14, 2020 at 08:58:52PM +0000, Luis Chamberlain wrote: > > > I think this needs a WARN_ON thrown in to enforece the calling context. > > > > I considered adding a might_sleep() but upon review with Bart, he noted > > that this function already has a mutex_lock(), and if you look under the > > hood of mutex_lock(), it has a might_sleep() at the very top. The > > warning then is implicit. > > It might just be a personal preference, but I think the documentation > value of a WARN_ON_ONCE or might_sleep with a comment at the top of > the function is much higher than a blurb in a long kerneldoc text and > a later mutex_lock. Well I'm a fan of making this explicit, so sure will just sprinkle a might_sleep(), even though we have a mutex_lock(). Luis