Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp927423rwl; Wed, 12 Apr 2023 06:11:01 -0700 (PDT) X-Google-Smtp-Source: AKy350ZiHu2+iWLkDXmdqQtb9Y844uzznRwLHGhRXH9v6MHYxGFN1B+SDl7t8X6JDetXqKFEHk4r X-Received: by 2002:a17:90a:44:b0:23d:39d5:f81e with SMTP id 4-20020a17090a004400b0023d39d5f81emr22720974pjb.11.1681305061368; Wed, 12 Apr 2023 06:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681305061; cv=none; d=google.com; s=arc-20160816; b=rlaj0zMwLVpLh0nc4rLHNBI8GNIZGP+owsN715toRC2WmELxj9HDyVlJbW7Fcr4v34 6iMmAELmjNwCm4L0aye0GkTbwjbkxpmjXPxp2KXjYg9QdtrtkTCsjNs/7qzjfrqDCOC3 9kC/Z8kRoVRzr1TzVYmWCQ/ZTeenm+CCZb/XCw9s9BvTX1X5e/CBDz1z9C77cf+P93CT OaFqcStI1vspQ4+aN5bPpRrDRRY/G5z/CN/QieS8IBwZXJRBs1C24VfnXQ7c45GVGzqp j8ytgq1ikxmiVca3b6P8HuY88k83sFk3rWWOgb8BIe0GClJMfruBh+whRkQ10MjX2EsX 5Vzg== 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=2u4C6fn8rcBG4p3IFP1tSLcJySxwgo6iZPmr/m9xEiI=; b=CBaIXjE/w1qtBtvoJyARSdy9jCV18xSKuF6ele6pwgI+Pq4SqqeLeKm1t7+cXjlAUc jxHp2OgodFe7IVvshvJiAUr4wkDI2NfThdeQBkLf6LHhn7gPHLe3U/038SKQ119Xa3oF gmfqViwRi0y9oRVyWXmNkQs/6UHDj6/PAHTn/gq5SwzMb8ubcK/0uSgDVQ8EbX9S+LjY Q+F8/OHl6oBAKe2f2p9twcSE32DZN4pkPeY9gkhzMMOV8aVpCoxVj7tpwpsO4yRxcWaG cFueeMCl08kCvjiBjGVejI6mVc+gNjJZhiHT2a0IVGy8RuJ8PeZndhEuhoS9VpeZJmws wPyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=H4xjivd+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a63f110000000b0051446aaeaf1si16518466pgi.637.2023.04.12.06.10.39; Wed, 12 Apr 2023 06:11:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=H4xjivd+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229792AbjDLNEk (ORCPT + 99 others); Wed, 12 Apr 2023 09:04:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbjDLNEi (ORCPT ); Wed, 12 Apr 2023 09:04:38 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C94F640F2 for ; Wed, 12 Apr 2023 06:04:37 -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=2u4C6fn8rcBG4p3IFP1tSLcJySxwgo6iZPmr/m9xEiI=; b=H4xjivd+25lajydBPWRap7/1zZ aWg+3k1OaiDh87KsoSgA13s5fv6UMEsDgKGzWIj4D22ZYXeT9xIOzjjsQiBPh3jXhTgenMvx1HCwO DADm48N/N6gPoQG7FXWDtJ5AybjAgJkQ5Dq/E0eHqnL5i4N7xwMNXEpWqXv68C6QM4szljLD5LW3/ VjzJqOpXGXgSVafz9ythipDVQdJDkRkSre5JBdWC2CYafk3pbSsqF9Dbysz9SjXuFP3AWUzMgdKNo Npv2J94oLBpboWl+UZMXzryV6EmpaxGdbj77ypZR9T6/OCfg+A+oXZNMh6Unyd5DoRxBIiV+XKJcq h3FZe16g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pma9J-006ssP-D2; Wed, 12 Apr 2023 13:04:33 +0000 Date: Wed, 12 Apr 2023 14:04:33 +0100 From: Matthew Wilcox To: Yajun Deng Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/rmap: convert __page_{set, check}_anon_rmap() to folios Message-ID: References: <20230412021811.1503281-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230412021811.1503281-1-yajun.deng@linux.dev> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED autolearn=ham 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 On Wed, Apr 12, 2023 at 10:18:11AM +0800, Yajun Deng wrote: > The 2nd parameter in __page_set_anon_rmap() is only used by > SetPageAnonExclusive(), so there is no need to put > SetPageAnonExclusive() in __page_set_anon_rmap(). > > Remove SetPageAnonExclusive() from __page_set_anon_rmap() and modify > __page_set_anon_rmap() to __folio_set_anon_rmap(). > > Since __page_check_anon_rmap() needs a folio, we can directly use > and change it to __folio_check_anon_rmap(). I do not think this is an improvement.