Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3586521pxt; Tue, 10 Aug 2021 07:00:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuUIhujT/8DKi1OyrNo27ecqx0y6v9mnuwP5mSegH0oKO2jYmty7Ebdv/oqE7a2xXpAX37 X-Received: by 2002:a92:d292:: with SMTP id p18mr120562ilp.286.1628604029470; Tue, 10 Aug 2021 07:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628604029; cv=none; d=google.com; s=arc-20160816; b=zCPUH+v95SHey1uUwvY32Lohq0qHFMJ+qv+IzmRvu7OXs+w3Q2o35/ymBdU4Wd4PTx JyIJ9iJJ6XBhfNek3TG94zNZkHaNw9spm1PYIeFHKXPY3X2TreEli/qmNWW4Q9LSq1KE qccInGI8rFZgMqWkKtLMb13/69Ikf6KbnXi/FchPV1p274CSCO4TI6PcDK4q/taEO5Vz FQAXs1tUyotw2Tl3Db2aoLJ/pY5bljeqZi7t9/jPp470xwr7s2KtNbcPLFyDmvAj71a9 7saYChfJNEIqZjESD3eV7a1WgBn9juO4FeAwak3agpAf0KbZYOdx92jUZESxERvRNa+6 l+EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CuE8tVzqrDVmqFyhKv4EHczZmJiXfG1mo07uoIkbB/Q=; b=JHzO2At+/zYbPfYW87JbAbSscTRJa1HpP9ljOYG/FJfHVK88O2+xFjYJ9xsdj3SXHK u6wH17URgR7ivEbql7GQd2Ym1+U61+TQ8n3tDRyRm3xRzYaPBUeJXYjP2UpkAw7SZLVt AYz90XVxFWtx376x+7Y6sPRkjuQj+PkHdioh3JZoDpbjlCAhteHPmOkRGmfnyHrGWwtM ImqpTugNYqHrNHDObyqRtYhAfuWF3pA5+OULVqqYmJ2TluAu+pqWxx73ZNsEgHGFPkB6 E/w0EAStPJWBW3y8oPPa4XZi77AG1zo2OipVxR752n3EjFVx+S+vaNm7PINNRtsEXOJw +/yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SLnBS0X2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 p1si5006290ios.38.2021.08.10.07.00.16; Tue, 10 Aug 2021 07:00:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=SLnBS0X2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240391AbhHJMKt (ORCPT + 99 others); Tue, 10 Aug 2021 08:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231324AbhHJMKs (ORCPT ); Tue, 10 Aug 2021 08:10:48 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA7D6C0613D3; Tue, 10 Aug 2021 05:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=CuE8tVzqrDVmqFyhKv4EHczZmJiXfG1mo07uoIkbB/Q=; b=SLnBS0X2kqj7gfFIvKrcxIDuT8 l1e9LPbXRGRmZfdUXZL5GeYVFo4qiOyU5YxECzStC4XBGXI7MRrZSk/Na4fM3HluxrD/dJjB4uTen rH/Hu93sf/N3tJYGh094hrvHbPJPAWGuhTGFYV0sx+NeuCSAO1eTdxR3B1NMk4Cy3ITosaow2DSJK 8TJHfnHnvpv83jazTEU6c5iWaSlOwYwqrERUz1LeBiqGHFqNh+4GVI4Eayx4Zat4UJlLEa/+s3uu8 pfTX0COt9hJMOAXk6ySLc5EI2UlY8QeG9dj9spem1sGKUxeFfHRosg8XB8Q+qPUTD+Tv6ZtLRalgV dl7BqyOA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDQZl-00C59h-PI; Tue, 10 Aug 2021 12:09:51 +0000 Date: Tue, 10 Aug 2021 13:09:45 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: Vishal Moola , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] Page Cache Allowing Hard Interrupts Message-ID: References: <20210730213630.44891-1-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 10, 2021 at 09:15:28AM +0100, Christoph Hellwig wrote: > Stupid question, but where do we ever do page cache interaction from > soft irq context? test_clear_page_writeback() happens in _some_ interrupt context (ie the io completion path). We had been under the impression that it was always actually softirq context, and so this patch was safe. However, it's now clear that some drivers are calling it from hardirq context. Writeback completions are clearly not latency sensitive and so can be delayed from hardirq to softirq context without any problem, so I think fixing this is just going to be a matter of tagging requests as "complete in softirq context" and ensuring that blk_mq_raise_softirq() is called for them. Assuming that DIO write completions _are_ latency-sensitive, of course. Maybe all write completions could be run in softirqs.