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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 3F781C07E95 for ; Tue, 20 Jul 2021 11:37:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 00B526113C for ; Tue, 20 Jul 2021 11:37:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00B526113C 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 91BB46B00BC; Tue, 20 Jul 2021 07:37:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8CB796B00BD; Tue, 20 Jul 2021 07:37:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7931A6B00BE; Tue, 20 Jul 2021 07:37:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 56FEA6B00BC for ; Tue, 20 Jul 2021 07:37:59 -0400 (EDT) Received: from smtpin33.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id DC3128248047 for ; Tue, 20 Jul 2021 11:37:57 +0000 (UTC) X-FDA: 78382766994.33.B31254B Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 1E6E5501408B for ; Tue, 20 Jul 2021 11:37:57 +0000 (UTC) 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=48ZoYAHxVjUR+g2Z6dUC+xAOF9LbotA5xFo5BSIxUUk=; b=IQIpktxqEtVGUTHiwSEv1nrG6X BV723Sv5+clirdeiwW6FCcNBVBLrqkobRbPMZRxYdgLNNEM4PoH/t98jeiB3ui2vy9hQ8ZvEIaiVJ S5g8rbvQJGwi5zolqSMWCwyYwDmePMhKqJUWdASTnM1iX6OM7NPzo94LbXhazyzAGw1N2lyMCsiaJ k1rg+ueGyMHOXT7jyNJhRfdDALoOSHvJAxFTQifHWyQJLyuhpIxWjvYeKh6Hqm8XQOM3ikY0nyxov 9H5MnPLuKSU83z2dtUelTBXh47oC6KC+OiYpuJjM1uEP8atppAOMXFOt4YXcBqr/NrlAvPhQ31IMU in5vCCfg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5o3V-0083QU-Ep; Tue, 20 Jul 2021 11:37:05 +0000 Date: Tue, 20 Jul 2021 12:36:57 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, "Darrick J . Wong" Subject: Re: [PATCH v15 08/17] iomap: Pass the iomap_page into iomap_set_range_uptodate Message-ID: References: <20210719184001.1750630-1-willy@infradead.org> <20210719184001.1750630-9-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 1E6E5501408B X-Stat-Signature: j5c7jpr49yyknt8fpcpq8zrtcpoztyka Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=IQIpktxq; spf=none (imf01.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-HE-Tag: 1626781077-662756 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 Tue, Jul 20, 2021 at 08:57:06AM +0200, Christoph Hellwig wrote: > On Mon, Jul 19, 2021 at 07:39:52PM +0100, Matthew Wilcox (Oracle) wrote: > > All but one caller already has the iomap_page, and we can avoid getting > > it again. > > > > Signed-off-by: Matthew Wilcox (Oracle) > > Reviewed-by: Darrick J. Wong > > In general reloading it from a single pointer should be faster than > passing an extra argument. What is the rationale here? I'm not sure we can make that determination in general; it's going to depend on the number of registers the CPU has, the calling conventions, how much inlining the compiler chooses to do, etc. The compiler is actually _forced_ to reload the iop from the page by the test_bit() in PagePrivate() / folio_test_private(). I want to kill off that bit, but until I have time to work on that, we don't have a good workaround.