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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55B24C43334 for ; Thu, 30 Jun 2022 14:38:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F0C28E0005; Thu, 30 Jun 2022 10:38:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 878488E0001; Thu, 30 Jun 2022 10:38:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7196F8E0005; Thu, 30 Jun 2022 10:38:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 601488E0001 for ; Thu, 30 Jun 2022 10:38:25 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2C01D35605 for ; Thu, 30 Jun 2022 14:38:25 +0000 (UTC) X-FDA: 79635157770.20.3F14D1D Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by imf15.hostedemail.com (Postfix) with ESMTP id 98728A003C for ; Thu, 30 Jun 2022 14:38:24 +0000 (UTC) Received: from cwcc.thunk.org (pool-173-48-118-63.bstnma.fios.verizon.net [173.48.118.63]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 25UEbwFJ000461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Jun 2022 10:37:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1656599881; bh=rZwPiLcKye0U/mwTOCKDykueQ6+V0zCIaDXWdLBBeO4=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Ys+pFhD/OX//kD7MlmS3BJ92SirYngNws0DllJmHUer2zwRl0B4HPiTpBItpRH7qa Ea2dBXSeGgJSOGobvkMMm0L5wwawJsm3tzxAaRfwI0+ojQ/YTUqnbZDiZaMHUmWalr 4KPAl3mjsxecX9dN6cvh/sfbBfg2ixmkBKdyvZkHAx1J5BMYEXsYDagvoE2COARDFG AbTkkKx7A0/ezq+rBHRm/GDh1L6i3MBCMoAqP4D2TU1+//oEaMQlqFAtY9tsAQ0nZb WW34OFwYzcCWgD5SvUNtzZyhlP3Rw0RULwD66GOSPUazwt6ddAZrmO/KprrAnVyEaq aLr/Unsy9Z+uA== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 8477815C3E94; Thu, 30 Jun 2022 10:37:58 -0400 (EDT) Date: Thu, 30 Jun 2022 10:37:58 -0400 From: "Theodore Ts'o" To: Dominique MARTINET Cc: "Matthew Wilcox (Oracle)" , linux-btrfs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Yu Kuai , Kent Overstreet Subject: Re: Major btrfs fiemap slowdown on file with many extents once in cache (RCU stalls?) (Was: [PATCH 1/3] filemap: Correct the conditions for marking a folio as accessed) Message-ID: References: <20220619151143.1054746-1-willy@infradead.org> <20220619151143.1054746-2-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656599904; a=rsa-sha256; cv=none; b=Yh8Dbge5IE/93BKqaW4BoJGGi3jTvi9EZkzH/11GCgemCq61ti7KeAWJjKWDr4pKDR5Rhv 7bZcAaATH7na4BxTyOiG68UwoRujeuHXfhQ331iKukq4yF1PX0JBxxm8ZS4m8hLG3z1zVy 0JGshc8K4pMNfsgN7DAgt26XR9xZG+g= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=fail ("headers rsa verify failed") header.d=mit.edu header.s=outgoing header.b="Ys+pFhD/"; dmarc=fail reason="No valid SPF" header.from=mit.edu (policy=none); spf=none (imf15.hostedemail.com: domain of tytso@mit.edu has no SPF policy when checking 18.9.28.11) smtp.mailfrom=tytso@mit.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656599904; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rZwPiLcKye0U/mwTOCKDykueQ6+V0zCIaDXWdLBBeO4=; b=ugwIe7Skm+m0sjpaCwwEjfnPs0liCottZbqpd2CGDZv8ODBb7yWSIEwez3NiItg676sfeS miwlo3/+lf6RkfRcDGo3pk4pYPwufLDRQwqJhBRjDfOh24hRzKNgq4i7fyoXbJZ1DYa5Hr GVKeRa7zx5zUks3/hWAqn5XxtYt9irM= X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 98728A003C Authentication-Results: imf15.hostedemail.com; dkim=fail ("headers rsa verify failed") header.d=mit.edu header.s=outgoing header.b="Ys+pFhD/"; dmarc=fail reason="No valid SPF" header.from=mit.edu (policy=none); spf=none (imf15.hostedemail.com: domain of tytso@mit.edu has no SPF policy when checking 18.9.28.11) smtp.mailfrom=tytso@mit.edu X-Rspam-User: X-Stat-Signature: irkpgeow3kd8yepcic638ojrpd55e8ar X-HE-Tag: 1656599904-611013 X-Bogosity: Ham, tests=bogofilter, spamicity=0.071007, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jun 30, 2022 at 04:29:05PM +0900, Dominique MARTINET wrote: > Hi Willy, linux-btrfs@vger, > > Matthew Wilcox (Oracle) wrote on Sun, Jun 19, 2022 at 04:11:41PM +0100: > > We had an off-by-one error which meant that we never marked the first page > > in a read as accessed. This was visible as a slowdown when re-reading > > a file as pages were being evicted from cache too soon. In reviewing > > this code, we noticed a second bug where a multi-page folio would be > > marked as accessed multiple times when doing reads that were less than > > the size of the folio. > > when debugging an unrelated issue (short reads on btrfs with io_uring > and O_DIRECT[1]), I noticed that my horrible big file copy speeds fell > down from ~2GB/s (there's compression and lots of zeroes) to ~100MB/s > the second time I was copying it with cp. > > I've taken a moment to bisect this and came down to this patch. I think you may have forgotten to include the commit-id that was the results of your bisect.... ? - Ted