Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4913478rdb; Fri, 15 Sep 2023 17:02:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGUvqgnx/qmivyzTP4989JYfZtJf5gE6oOF8yjm70FiBO2qCn/vPqqpA9eKTi06LdXjaLUs X-Received: by 2002:a17:902:da91:b0:1b6:6b90:7c2f with SMTP id j17-20020a170902da9100b001b66b907c2fmr3629926plx.55.1694822567201; Fri, 15 Sep 2023 17:02:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694822567; cv=none; d=google.com; s=arc-20160816; b=Zg8SiVCUt6V+MhEBz/kyQpuhJ4B44Clm6bHJbBAjjzSkBCqJkoFROabVTMdG5INFgh 8RimwQebqTa0W8C9fjMjOsS2PSk50UQ2yfzEWKVOOcYF5eZTJ0ajP2p6PEXzrqVyg6Vc 84AkNgxSCNhteE8TeD4QlGO+3j8DSiEPOt5/WAVXpjCE4IVIBJr0vjIeenIqepK9awgJ zgk2Rw77CQ6ZzedMNVU0OPdB4tPQoLCOFs1P1nVYKjGtFRFa5RRRtuF5Y37AHhxeXSWq 8TVnbteLLsGxkQKeDHQItzoc0Z+83T73HJF5YgRGBMozs5w7F7Dk7E6heConVzBvPGCv raAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=cXJCz6BbI6aPCSAZn+qO6JUf8WIvxxBmFHYvub3SbQw=; fh=/wYWerzDTEW0oRZv/E2eVmR3JHrJ/RjsUk1fuHM8F70=; b=DxV7ZTCgAVUCIyVvAjzeqhEzxGYgoSvgBqYq1wwR5XZaOi+83Ga5gLZE9Ei5jghOIf MqANR+3dlx7mDlu+p0Tz52q87Ldk6SI6HJIoccpuBjhziPgMBGtlRsaiGwcr8FmJ8o4S BYg8LQPqc8SzO7bmHtlu7n62TjOkNIU9IWquW8tE4p2WkOnTMRAWc77ZZbbHl35KiAi2 4oenptaKQopB8PMiQnf0f0P6crelPQWw4covtbvvY4I/88451aWRX1EiCzHdY3ZZGx2l xWN2B7/EgqsFw7jdCJXM3gG3XitfGNUwufE6CsmjK1Ea0i0luspoSM6Xm9kTxSU5drXV e5cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W7K9sdwp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id l7-20020a170903244700b001b3d6c68bd1si4283007pls.643.2023.09.15.17.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 17:02:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W7K9sdwp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id AE2BB8021E10; Fri, 15 Sep 2023 08:27:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235867AbjIOP1j (ORCPT + 99 others); Fri, 15 Sep 2023 11:27:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235233AbjIOP1i (ORCPT ); Fri, 15 Sep 2023 11:27:38 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7816DE71 for ; Fri, 15 Sep 2023 08:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694791610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cXJCz6BbI6aPCSAZn+qO6JUf8WIvxxBmFHYvub3SbQw=; b=W7K9sdwpt5PNhoX4dWIHdWIP3c+o+gYQdCMpJWJjGLgml5QEd28vVXF2bbQa9i6ttGdp5Z rMN6MXMXVvzOWYcIOddX6nuhOapUhoaQw9kEWhvTLGKdy+nN9pWbJNmgtYyo1uD4TdRyCG 3cB66hhZvq+H055LGCXfwRqNiKseYss= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-266-aoU2dkBWOvmTPY5J-I6H6A-1; Fri, 15 Sep 2023 11:26:46 -0400 X-MC-Unique: aoU2dkBWOvmTPY5J-I6H6A-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-31fed999e27so740619f8f.2 for ; Fri, 15 Sep 2023 08:26:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694791605; x=1695396405; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cXJCz6BbI6aPCSAZn+qO6JUf8WIvxxBmFHYvub3SbQw=; b=rmdTjAvgNe4i54oe5oZFNaVtZOPDGOPkOtYOi/nom7eu0RHH5Ch9tspzM6wgMcrpOH ux1C1q460IdMVMNlhsxsS2jSfhpMsWDOclAJ66oIguYNH1sv1w4jBe38gf2NQKW5R9dA eCAnvEQxClvLSJDaAFr5QnkuzQ416eyIC+osfSQt8+oCNqnFwQm1IhOyJ0t9q38U5bxj du1ukjuXGaCrejQQCfLKJuqMlSnBcb7KdYrn3gPlgw+vHy2Gb2bmpFjhDrP07RqzFa3A ttlzZP509AiIpoGhbEVQ2a3Fl66VCymlFx3j04qVAvoI3b5c3c9nGgnBKFOVdq/Ycrnu umeQ== X-Gm-Message-State: AOJu0Yx2oRORODtriQTgcwYn9qcpMSKtaZFBikFrq4QGpTNjjo5UlaGc lSJbIzN7klqeR6MVhEO03z+9uJ/s0LhmMs5ryIAJbBsF90LE/CikRte8CzRUCsYJPS4pXEuwC07 aoxHCWVFyugDqgV5FUnVmBuIDBdSXPUrJ X-Received: by 2002:a5d:4705:0:b0:314:12c:4322 with SMTP id y5-20020a5d4705000000b00314012c4322mr1846934wrq.4.1694791605413; Fri, 15 Sep 2023 08:26:45 -0700 (PDT) X-Received: by 2002:a5d:4705:0:b0:314:12c:4322 with SMTP id y5-20020a5d4705000000b00314012c4322mr1846917wrq.4.1694791605012; Fri, 15 Sep 2023 08:26:45 -0700 (PDT) Received: from [192.168.3.108] (p5b0c6d49.dip0.t-ipconnect.de. [91.12.109.73]) by smtp.gmail.com with ESMTPSA id z9-20020adff1c9000000b0031f07d1edbcsm4729335wro.77.2023.09.15.08.26.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Sep 2023 08:26:44 -0700 (PDT) Message-ID: Date: Fri, 15 Sep 2023 17:26:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] mm/rmap: convert __page_check_anon_rmap() to folio Content-Language: en-US To: Matthew Wilcox , Yajun Deng Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20230915101731.1725986-1-yajun.deng@linux.dev> From: David Hildenbrand Organization: Red Hat In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 fry.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 (fry.vger.email [0.0.0.0]); Fri, 15 Sep 2023 08:27:43 -0700 (PDT) On 15.09.23 15:49, Matthew Wilcox wrote: > 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. Right, the address would have to be adjusted as well by the caller. -- Cheers, David / dhildenb