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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 4291CC433DB for ; Tue, 16 Feb 2021 08:42:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7CE3764E08 for ; Tue, 16 Feb 2021 08:42:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CE3764E08 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E09498D015C; Tue, 16 Feb 2021 03:42:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DBA158D0140; Tue, 16 Feb 2021 03:42:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CCF918D015C; Tue, 16 Feb 2021 03:42:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0072.hostedemail.com [216.40.44.72]) by kanga.kvack.org (Postfix) with ESMTP id B89AE8D0140 for ; Tue, 16 Feb 2021 03:42:34 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 8507F585F for ; Tue, 16 Feb 2021 08:42:34 +0000 (UTC) X-FDA: 77823489828.12.pest89_2406de527642 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 5EC281807D7FB for ; Tue, 16 Feb 2021 08:42:34 +0000 (UTC) X-HE-Tag: pest89_2406de527642 X-Filterd-Recvd-Size: 2186 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Tue, 16 Feb 2021 08:42:33 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id C34B368B05; Tue, 16 Feb 2021 09:42:30 +0100 (CET) Date: Tue, 16 Feb 2021 09:42:30 +0100 From: Christoph Hellwig To: David Howells Cc: Trond Myklebust , Marc Dionne , Anna Schumaker , Steve French , Dominique Martinet , linux-cifs@vger.kernel.org, ceph-devel@vger.kernel.org, Jeff Layton , Matthew Wilcox , linux-cachefs@redhat.com, Alexander Viro , linux-mm@kvack.org, linux-afs@lists.infradead.org, v9fs-developer@lists.sourceforge.net, Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, Jeff Layton , David Wysochanski , linux-kernel@vger.kernel.org, Sebastian Andrzej Siewior Subject: Re: [PATCH 34/33] netfs: Use in_interrupt() not in_softirq() Message-ID: <20210216084230.GA23669@lst.de> References: <161340385320.1303470.2392622971006879777.stgit@warthog.procyon.org.uk> <1376938.1613429183@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1376938.1613429183@warthog.procyon.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) 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 Mon, Feb 15, 2021 at 10:46:23PM +0000, David Howells wrote: > The in_softirq() in netfs_rreq_terminated() works fine for the cache being > on a normal disk, as the completion handlers may get called in softirq > context, but for an NVMe drive, the completion handler may get called in > IRQ context. > > Fix to use in_interrupt() instead of in_softirq() throughout the read > helpers, particularly when deciding whether to punt code that might sleep > off to a worker thread. We must not use either check, as they all are unreliable especially for PREEMPT-RT.