Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4828533rdb; Fri, 15 Sep 2023 13:40:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHITlM6MPuQ4CI2mtqeT61YwI25VapKJ+Y2gg3yaYIxxfl18Z9J/Q3jbJKLWXa6gaLOPKRa X-Received: by 2002:a17:902:6548:b0:1c4:2b87:76f0 with SMTP id d8-20020a170902654800b001c42b8776f0mr2672689pln.47.1694810453579; Fri, 15 Sep 2023 13:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694810453; cv=none; d=google.com; s=arc-20160816; b=MukaTBcPAmCD5MbCVTv5EV6oKIHRdLU2WRDz02gG5Miq6BhgpVBebouM1Qgc6jk59q xsrBgwUkahnLs3GfQZI6kl99pvb+sGYAXJQW+lYUFU7yYysYEe7+qKud/wfA6Y6NjcYh RJBbAQbzxYKpk6C0k9fMwffI9RXRbtjbY0yLpskc3LhFQI/f2lcbZVww6+ZgCFUruyku oQsrMJlMYysMEjZID83vgMeq0tpz0efbpIJ2aQnDt8i3QQSbRdn1oENWUhKgul5N/LrQ cEBZbqb4moYnAUiGMVGhouQuVaUTgNsqZEKb079FlGuCwN9kS7AgBLw3pZSQjLEqKMEY TuKA== 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=UIIhXNicKHnnfcqIBqQZ6OYm4L0/hzD6ZeRNbDy+XHc=; fh=iae8W7+YsuOdP40WCytoCMmYg2BD/IEWEocE6dbe21o=; b=mnw2UWb99YVfb5AvQvqYhjjvVkrn2P2GcqlQoHRBzh1G5tc4bC52bFbI3oiOD9zpIr 4y7xSFENQOMQkOkGMiyyYZvTF5tyQ9+rEf/JiYwUBBocHh0LW4c70+iL8Wfk/MMj+2DQ gKlLrXDu2P7Q/OOT1OJtOKO5zCoa8zUdTD916tYi4zNRLwawhbpWHqh+OREnpmecbGxJ OwDT8Oay1KzTG9TWQitNFjQUMycXIOz1UPyWe9zxcvUdaDG16pOkiwqdz3GAufCDerD8 Ugedh0WLc2hdFpZzK3TtevMxySfPkA8bP8N7qqRGXieTG76xVUfISdgHDMQiTV/I8ID7 rqYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cul73f0l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id z14-20020a170902d54e00b001c442525233si891055plf.296.2023.09.15.13.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 13:40:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=cul73f0l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id C62618048D90; Fri, 15 Sep 2023 06:49:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234804AbjIONt5 (ORCPT + 99 others); Fri, 15 Sep 2023 09:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234621AbjIONt4 (ORCPT ); Fri, 15 Sep 2023 09:49:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AB7926B8 for ; Fri, 15 Sep 2023 06:49:46 -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=UIIhXNicKHnnfcqIBqQZ6OYm4L0/hzD6ZeRNbDy+XHc=; b=cul73f0l14bcuYtUcvN9r7dVKs DcurGPe+nrC5goDeEd1PUy62+J/VZP2dW6a0uPG+1Aa4aKTNkmJhILPvN758RreVgCSZDhDBKaD18 s9+JwvAJPyijhJ7oKOdna1B1JZvMY6SQ9Wi8RjGpMOkK1vL7aP25/eRG9WCKIirOWbK6wItUxv6BI 0utrrklNHiI4Ioepl+L5YmGWka1WGlrEED+nDJJapteTCXDb1w9F46OJ1AhGCh9L/cUt0+IKde0ct 7LNqA4V36vXtu3p8qxqavZcaejnyfLNd7W39dzAGQ3ZDyIFYSlabAPCyHgZ2WxHPDkn6ahaThLBN/ H158gsSA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qh9CV-00A1sQ-QO; Fri, 15 Sep 2023 13:49:39 +0000 Date: Fri, 15 Sep 2023 14:49:39 +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_check_anon_rmap() to folio Message-ID: References: <20230915101731.1725986-1-yajun.deng@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230915101731.1725986-1-yajun.deng@linux.dev> 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 groat.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 (groat.vger.email [0.0.0.0]); Fri, 15 Sep 2023 06:49:56 -0700 (PDT) On Fri, Sep 15, 2023 at 06:17:31PM +0800, Yajun Deng wrote: > @@ -1176,8 +1175,8 @@ static void __page_check_anon_rmap(struct folio *folio, struct page *page, > */ > VM_BUG_ON_FOLIO(folio_anon_vma(folio)->root != vma->anon_vma->root, > folio); > - VM_BUG_ON_PAGE(page_to_pgoff(page) != linear_page_index(vma, address), > - page); > + VM_BUG_ON_FOLIO(folio_pgoff(folio) != linear_page_index(vma, address), > + folio); No, this is not equivalent. You haven't hit any problems testing it because you don't have large anonymous folios.