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=-3.6 required=3.0 tests=BAYES_00,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 05457C433B4 for ; Mon, 10 May 2021 18:11:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 699F2611BF for ; Mon, 10 May 2021 18:11:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 699F2611BF 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 B2FF16B0072; Mon, 10 May 2021 14:11:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AB8E86B0073; Mon, 10 May 2021 14:11:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 980606B0074; Mon, 10 May 2021 14:11:53 -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 7864C6B0072 for ; Mon, 10 May 2021 14:11:53 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 2F3C962D0 for ; Mon, 10 May 2021 18:11:53 +0000 (UTC) X-FDA: 78126114906.19.A8E7555 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf14.hostedemail.com (Postfix) with ESMTP id AD8BFC000C61 for ; Mon, 10 May 2021 18:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=YL/AMILJQ/MhajJ8+fnwzdJVjELrW3Cc7diRHC8qblE=; b=PLqLn0j5PoKbrh6VvmUSIr6l8i m8fa8nPq4gYXhF6Rn4dgILKWMjjl7o8SH9lg5SYTpcsggrmMHPyjsoeUpUNoNTR0oe/2nflr9voHC mgd4g8Z7yyeIJ7q+nicXHEqYw5/hVDnntM06Is+SsQFVrdSv5ie1DvIWiwRc/g8IS2C6z+K+eFfMQ bABMNr7fkPmtzTzDvG1cseklK17UAEAX/5Ap27q9PJnvy8h7UN4RI4MmiAq/tz4thtJ13v84IpOw0 XMMw3IEfcIDcHkuznaZj7wqb1rhPMwq94acK9NCfDzZKucYeUpXIsLo+5v5vi9+K2Rn2TY1i4Zidv ROzmVcpA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lgANT-006SNM-UC; Mon, 10 May 2021 18:11:43 +0000 Date: Mon, 10 May 2021 19:11:35 +0100 From: Matthew Wilcox To: lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org Subject: [LSF/MM/BPF TOPIC] I/O completions in softirq context Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: AD8BFC000C61 Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=PLqLn0j5; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspamd-Server: rspam04 X-Stat-Signature: ireg4nna174rgq8om8x46abpzppg8sxf Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf14; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620670288-643812 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: We have some reports of the interrupt hangcheck watchdog firing when completing I/Os that are millions of pages long. While it doesn't really make sense to construct single I/Os that are that big, it does flag that even, say, a 16MB writeback I/O is going to spend a lot of time clearing the writeback bit from pages. With 4kB pages, that's 4096 pages. At 2000 cycles per cache miss (and with just the struct pages being 256kB of data, they're not in L1 cache any more and probably not in L2 either), that's 8 million cycles with interrupts disabled. If we could guarantee that BIOs were always ended in softirq context, the page cache could use spin_lock_bh() instead of spin_lock_irq(). I haven't done any measurements to quantify what kind of improvement that would be, but I suspect it could be seen on some workloads. (this is more of an attempt to induce conference driven development than necessarily a discussion topic for lsfmm)