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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 ACC10C2BA2B for ; Wed, 15 Apr 2020 06:47:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4E54B206D9 for ; Wed, 15 Apr 2020 06:47:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="K9+bRfkI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E54B206D9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B57EA8E0003; Wed, 15 Apr 2020 02:47:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B08398E0001; Wed, 15 Apr 2020 02:47:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A1DFA8E0003; Wed, 15 Apr 2020 02:47:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0135.hostedemail.com [216.40.44.135]) by kanga.kvack.org (Postfix) with ESMTP id 880A28E0001 for ; Wed, 15 Apr 2020 02:47:32 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3AE6F52CC for ; Wed, 15 Apr 2020 06:47:32 +0000 (UTC) X-FDA: 76709158344.21.stick02_24a96e8dfa63f X-HE-Tag: stick02_24a96e8dfa63f X-Filterd-Recvd-Size: 2909 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Apr 2020 06:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2gmDYLi4/Kmt66vaVwEAhPniYnGKhZzhEZo2/uC5wIA=; b=K9+bRfkIbjPRAj6/hm1WXdcGYq RKI3+ySEt4A6WXG3J1GKfCgXt06KUGaBEvkJIq+Ie1IZuw2l9X2O6i4sieH18zY4z3skuFesVclAN BzDFLAlYhdBM4ie6U2u3ELSTPd/eCBvy+OjM7KO7k4qcRkz7xTxNN6JrW15dsWYFQSdozekpJTamE y1JskYiFntJpdpNo7Vr8fxBfqhHY62ENK3TN1b/rFEAEXkNUniJITN6C4B88EMz0k45doOCEKueRC XkVe8IHDFCyGId329J0iVUv8TlpM2rz884iyI4vRivowvIeJw6pDmZO55b9WOc1/ewo+lyxeh1CPb DB4NnBhg==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOboq-00041j-2i; Wed, 15 Apr 2020 06:46:44 +0000 Date: Tue, 14 Apr 2020 23:46:44 -0700 From: Christoph Hellwig To: Luis Chamberlain Cc: Christoph Hellwig , 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: <20200415064644.GA28112@infradead.org> References: <20200414041902.16769-1-mcgrof@kernel.org> <20200414041902.16769-6-mcgrof@kernel.org> <20200414154725.GD25765@infradead.org> <20200414205852.GP11244@42.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200414205852.GP11244@42.do-not-panic.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 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.