Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5540819pxb; Tue, 16 Feb 2021 00:45:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVshHmFXHEkHNMnkrnvw9b3k1IbFWHXIDbXzMERkTuRT1Fq3a1qxN/SpBWRSoiE0Uuyp3w X-Received: by 2002:a17:906:5d0b:: with SMTP id g11mr19425960ejt.542.1613465133795; Tue, 16 Feb 2021 00:45:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613465133; cv=none; d=google.com; s=arc-20160816; b=fYBdzvQQakF7SmZoB4FWp+/PF/qHTx3J3rhSsz02W0dsorPqC05F3X7lQ8cSqjuiT6 MOB6LWRjlI4EdNkPM+l8s9zvPOXTR8TdzLAvTk7k73xn1qcmVJO4PotmvmojVPPys4uQ ZebpequVGfci1s4UdDfEXspm0vrDgZTEOz6iP9yB+HhLiFRorXGSQRuTOAInDU3sbyZa 7LkqBF68hYcaE4MQwo3xjfQqYP49PijY/hwLIXU+ExyjbmI4Z+m0UdXIC2xT38pSliZK l0aB8pEkDd78kiBuTuOeVemmYIDGoNRxcWshZaYekhL/7dCjXKxKs4KPt/OiTZrtKNK2 5aCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=1PtOoy87Jpfrox1T/UF2Ks3gJEq0/Av7M2iHnGcimOo=; b=DJQh2NoAJyQUHHs2OHUlByFb93IKr/Rz/hXvr1LUd/BHTUAQezqmL32JQkm3ZCtXqw ZYBgqSCQVA402a+DYUK37GSq9AbkFGBQpIByxWgQ5PTsF6sHQp7PoRMajxYO22jP+L8u Uwa6W9SK/19SrFqtktyjwf1QcfQEskK0/jff0sfqmjNLYE5Ro7ATUr4ExEI1udp2ajNo w9dhUOw3bkCOjsz4ugNDOX1zF16WvTRkGJ+UGf4x84XkdHu9vHRO09JxoBOGbmnvPBTo QXdgqajeKnt39CsMkXwJgD6TrAnKdH4MilemC616aKyIoxbcJWJWnMIS+1M5MXDixKQK tf1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c6si2338584edr.183.2021.02.16.00.45.02; Tue, 16 Feb 2021 00:45:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229979AbhBPIn2 (ORCPT + 99 others); Tue, 16 Feb 2021 03:43:28 -0500 Received: from verein.lst.de ([213.95.11.211]:40353 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbhBPInO (ORCPT ); Tue, 16 Feb 2021 03:43:14 -0500 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) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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.