Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4964785rdb; Fri, 15 Sep 2023 19:34:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECX8NmjC6fKIV8Zo1wFPLfcP/yFB6zbWna9tS39YG3Rgix723qzyot3pCXQLEefULMO7MH X-Received: by 2002:a05:6a20:5648:b0:154:b4cb:2e8c with SMTP id is8-20020a056a20564800b00154b4cb2e8cmr3406379pzc.24.1694831686924; Fri, 15 Sep 2023 19:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694831686; cv=none; d=google.com; s=arc-20160816; b=bKZ081uMfaS//N2n+f/O8jg4fy/kZixbf2ouYA2a5VPTdtwmEwVMee0YvFQCEPlFVo WT1uj+iz0s3Rn3NbGgH5Sp2LJma+1rjiShLxxfhBnEChcx6mrnStvQkQj83J2+i1raEo hllYOW3HFreoqmK6UgKp7n11LZndgdVLfnowBoPHtqb3qUBpLcf4i5VW/gxizvB1DRPU MmSvhmHyF/E8/SMTl1mzjijI3nzn6kKppkkwH5WFut9K3gBwBiyGSVHLKjdeg79tKSOu cjex3GhdvW2PT0O9eYgVXIiYygLbGMnB49f/OtZh8ySU4WeIXKxPjXvYFEEryj7Z13f7 JY4Q== 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=14vBvaf+q0K2fr0TOz07mbChpshy7ApizxiUPLAC/WI=; fh=W11qpygqhVl+bKjrif44rQ6UzYM3D5CrbTfnG3zvQNY=; b=b24CxZnW0VE/SSh1ERHw8+4oBJ5mTQhpFFwvHQJ+JT2UKXtUWzMXfFArNC38xJgwdQ omeOfPicZoV07q1vm78eKDUJMnICl8Inl6aRLDGZmLU8gtlyPDIF/f/ZnSvtsyulNhHv hz6Wagns9plYBRAxZmSA323OIT50REhXvo8hbxse/BCwJ/1WEgN5kOpI9v2Bk3KxQSkO /00L7wavyglv1J+gYn+va8urpixio2VTIBSEQWpOO9CU1m18cbj9Y/7p46MIByJbYj7k bz8Un/BBxXNb4gEq/LiD//vR+ouN8KBACflLqD5XAM2p9QPdpI/qkaEsntd7HTfLBSKT qbzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Ja3fQlpP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id i13-20020a17090332cd00b001c38666f77dsi4551694plr.596.2023.09.15.19.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 19:34:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Ja3fQlpP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A619082CED05; Fri, 15 Sep 2023 12:52:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbjIOTvh (ORCPT + 99 others); Fri, 15 Sep 2023 15:51:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232230AbjIOTvG (ORCPT ); Fri, 15 Sep 2023 15:51:06 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D226C7; Fri, 15 Sep 2023 12:51:01 -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=14vBvaf+q0K2fr0TOz07mbChpshy7ApizxiUPLAC/WI=; b=Ja3fQlpPoWGk+zq+9o1/WB9r5B /7dMsOKS1yrOjRb8Npu5GcxdpAMGp0GzSdiTzniP4vkGLdM3IO2rvVEhyIa/gbKtpyNG3Buydxgl9 EvUC5wZyoC5bkop2xQzC7KdgwPN0+YGcy6VQ7VxfMsvH756Wd1s59ay9eYQCyDHfC9wKDgxcBIrnP Fzoso8qb1KMfqTtprpebj7oi1UR9jn9u2U0crWJpbFWODC4aaduG4hG8Cijy6q784u9m/SU9gNl2H 9T5uioF8X++lPczVI0O/z3eW6vp1doWkFRhhHmrOUXFbqH/k/NC+4qNxQz+2M0cZXTwLS3bQMVLLq +g3eyoHw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qhEqB-00BiaK-AI; Fri, 15 Sep 2023 19:50:59 +0000 Date: Fri, 15 Sep 2023 20:50:59 +0100 From: Matthew Wilcox To: Pankaj Raghav Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, p.raghav@samsung.com, david@fromorbit.com, da.gomez@samsung.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, djwong@kernel.org, linux-mm@kvack.org, chandan.babu@oracle.com, mcgrof@kernel.org, gost.dev@samsung.com Subject: Re: [RFC 08/23] filemap: align the index to mapping_min_order in filemap_get_folios_tag() Message-ID: References: <20230915183848.1018717-1-kernel@pankajraghav.com> <20230915183848.1018717-9-kernel@pankajraghav.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230915183848.1018717-9-kernel@pankajraghav.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 15 Sep 2023 12:52:15 -0700 (PDT) On Fri, Sep 15, 2023 at 08:38:33PM +0200, Pankaj Raghav wrote: > From: Luis Chamberlain > > Align the index to the mapping_min_order number of pages while setting > the XA_STATE in filemap_get_folios_tag(). ... because? It should already search backwards in the page cache, otherwise calling sync_file_range() would skip the start if it landed in a tail page of a folio.