Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp392981rdb; Mon, 18 Sep 2023 20:26:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjPl0zA2iKd+Wci5HvdMY7xp9o7sNE0J3RtT/Fzx9hhexoxvDkIpVFHgZM10WNJaw2mrF6 X-Received: by 2002:a05:6358:618c:b0:140:f6ab:b11e with SMTP id w12-20020a056358618c00b00140f6abb11emr11178120rww.28.1695093965717; Mon, 18 Sep 2023 20:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695093965; cv=none; d=google.com; s=arc-20160816; b=TJDXjOiyajIdxTZtpX1tUfg4QmLDzPB1k8uNGaAtlB91LOh793uZtrHWA8SLlne/EJ zTJWdjbomY59BkGzjECHokS7fIuenxvHDS1KNGMz5XWGqWVm26/uySbEJg0LOVge9wpY ExWg3RTT4Z8KCwOwVIEYLMwjo/DGZUquBroVHRhF8HPXjrRSu5vCPN2hN/9J8PjS1Svq Mcxw9i0I8/UgPLg2/PpNfvklDTL6Y8E32HZtnBVhuprk+I6c0DkC+XvPsc+p61H82TML XNC31usegZbcky/pPr9lNAIjj+41eZbwS8OS5uY070u+2yWSHRu2ubAgayzLzPbjJZkQ cyuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YtFZ4aIMH+wK5gxLvaFez4GPeCFUiImPTsyXwfH5C7Y=; fh=Vsp+c7GRJlVZsZDt79+TVaBgq2pUtF1SBSpfPhPIXIw=; b=Wq63loou5Ga24Ik1KxRoMkv3v1NUJAHfflY5dDuuQYjKd89ZJCFFe+JzgwvB0x1AiM x81gBxLLcQ9LVtBIksFrgajUjkxwN94rhHX33ZB2GW98LVMaenHf+x6iuO/7kmw+8Eih y3NNWiP+cmaJN90M8v0m+sOfg9LthA8OwZ1lSoZ3u/M0+mECZHVixRqJg/ALPE7A5Q9/ YKV5YHn4BFOVejW+WuiC9taQJF3XF9Kqm1Gsn/y8Jl1DgP7jvnf10ap0JiN/qe2LougX 0eyh56UaFAlMvrtgavC8RAoLpgyc/WREa7NGezzhDSmyiUvxHEfKSDKLFPTiHyXvGDxn o74Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=xP8ctjwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l6-20020a056a00140600b0068fef37e5bdsi9265036pfu.244.2023.09.18.20.26.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 20:26:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=xP8ctjwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8EE1A80477A7; Mon, 18 Sep 2023 11:20:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229606AbjIRSUh (ORCPT + 99 others); Mon, 18 Sep 2023 14:20:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjIRSUf (ORCPT ); Mon, 18 Sep 2023 14:20:35 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 550B2FB; Mon, 18 Sep 2023 11:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=YtFZ4aIMH+wK5gxLvaFez4GPeCFUiImPTsyXwfH5C7Y=; b=xP8ctjwJh6nbn8EmKDuPATY+1P bebaZJXtSL6UspdqmjCpgGWN7G4EFwZl4o8h8y0gFUPPGp9L8nFi+3VaH0gOf7kX+whvSsQRjV1or 1u1KVmuArHYxagGNl7R9/xWe3FEjATP2Rf5uVeFt7Vr6y21uk3O9IzWk0eb7Qm5JaXG6PHClEqu91 8vw4ZCb6P3fRhMRzfM9OkcYS72jaD2p9s6Q+keZZEVtUFeddKHtVfHyhxq+c7vo2rm5SeV16avKib EmjyxF3KYOAIVWGBeeyJjjOiVkmeGaa0W7G6Zf6Su7hGbq284xw8f66CI3ZBDx/+/D3lXbXo6Pu1j mmCMH6Cw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qiIrD-00G4Zw-0J; Mon, 18 Sep 2023 18:20:27 +0000 Date: Mon, 18 Sep 2023 11:20:27 -0700 From: Luis Chamberlain To: Matthew Wilcox Cc: Pankaj Raghav , 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, gost.dev@samsung.com Subject: Re: [RFC 04/23] filemap: set the order of the index in page_cache_delete_batch() Message-ID: References: <20230915183848.1018717-1-kernel@pankajraghav.com> <20230915183848.1018717-5-kernel@pankajraghav.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 18 Sep 2023 11:20:50 -0700 (PDT) On Fri, Sep 15, 2023 at 08:43:28PM +0100, Matthew Wilcox wrote: > On Fri, Sep 15, 2023 at 08:38:29PM +0200, Pankaj Raghav wrote: > > From: Luis Chamberlain > > > > Similar to page_cache_delete(), call xas_set_order for non-hugetlb pages > > while deleting an entry from the page cache. > > Is this necessary? As I read xas_store(), if you're storing NULL, it > will wipe out all sibling entries. Was this based on "oops, no, it > doesn't" or "here is a gratuitous difference, change it"? Based on code inspection, I saw page_cache_delete() did it. The xarray docs and xarray selftest was not clear about the advanced API about this case and the usage of the set order on page_cache_delete() gave me concerns we needed it here. We do have some enhancements to xarray self tests to use the advanced API which we could extend with this particular case before posting, so to prove disprove if this is really needed. Why would it be needed on page_cache_delete() but needed here? Luis