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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 54E12C07E95 for ; Tue, 20 Jul 2021 11:38:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 34E6F6113A for ; Tue, 20 Jul 2021 11:38:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236955AbhGTK50 (ORCPT ); Tue, 20 Jul 2021 06:57:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236664AbhGTK5T (ORCPT ); Tue, 20 Jul 2021 06:57:19 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52FDBC061574; Tue, 20 Jul 2021 04:37:58 -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=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: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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.