Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp556057pxj; Thu, 10 Jun 2021 07:19:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpB7RkAkPtdFWjSshiKe1gi+WW04j29/Rj90Xz95dE4xc8XntI/lwrvPpdDm5rgL5uEF8Y X-Received: by 2002:a17:906:e2d3:: with SMTP id gr19mr4565359ejb.525.1623334747013; Thu, 10 Jun 2021 07:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623334747; cv=none; d=google.com; s=arc-20160816; b=oD9vBrZAFfD1EMnC84xkGFb1KZ0DOlpRgNTXV14Km+aT/GaYGW7avro5xOWJsHgCTY EAoWnRG5bBUbJXc6W/cWNRMko4+bNu1NjfPSg9ZlChHoso/YgdT0H+sC5yhJNKhNc4iA Nsq3BVGQ5Vf8KltEXdLlgO4qj/tckqcskl7+c7uMdOkcqC3TOp/i3Dr4UFggRiRDj5BD t//BRpoL9YGg1Fd+X9XXJtpSkysYrtJhtqMJavtFTIBfZZC1IO0L+GgLrNqx3lhfPn8d Y53+aAnIfDHmgj5QP+zBDpG1SiL27x2VODIjE5zK3i2TPQR18Oa1xsAS/HDapZbggw1X +uLQ== 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=3eMUW9x1stkaG9D/YeYgpV7BE6hDJxv48nfPNnU5COg=; b=BjBdJE52Xu0gwmfXo9+D7AcLG2Bg9jyUobA88X9QzEcipdYhMUy2RmHyz6izRzO2AY gNPO2e+nm7NtCAjiV8kEHDTD42VBPdQiefqnGdhLziaOv3n0HO1yq8YrIzI563KEj329 mqTOFuUOg+xYFyLoflfnGkkXNv1hNEJ4vWvzcfQT8fzQl15AqGnaV+S9uzK8SGOk9nbF r6Nf8OufGxSZTGjwa0v4FtujtfiuhxczSpVH5LPoBgqcD/kMQ4fa7Wv0BvD8vy+p0twW RilNE+tmFOWBPU6UtEJnXPEaW2AtGRAu5dSIGlFYFw9P+pGZcRovw9bs41LpPynAeoeC j2Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BBZQgVmD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 26si2547849eja.192.2021.06.10.07.18.42; Thu, 10 Jun 2021 07:19:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BBZQgVmD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230368AbhFJOQh (ORCPT + 99 others); Thu, 10 Jun 2021 10:16:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28610 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230113AbhFJOQh (ORCPT ); Thu, 10 Jun 2021 10:16:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623334480; 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: in-reply-to:in-reply-to:references:references; bh=3eMUW9x1stkaG9D/YeYgpV7BE6hDJxv48nfPNnU5COg=; b=BBZQgVmDoadEXNvnBY+fDPqhyIyZh/HA2bwvrK88tlgh3O0d9wX8wcrJFWSntTgOzLx9Ge r024Dp6w/QXxnj5Sfc37vWaunTcsXKuHanw10OdjznbIiKhHL25VfPBMl1WqAl1YD2yKPw FmZHc4Y8LOjLlYXrwzkFH44D/r3Uk0s= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-575-kAIBFjVHOSCdJYrJaSwv6Q-1; Thu, 10 Jun 2021 10:14:39 -0400 X-MC-Unique: kAIBFjVHOSCdJYrJaSwv6Q-1 Received: by mail-qv1-f69.google.com with SMTP id n17-20020ad444b10000b02902157677ec50so20406066qvt.12 for ; Thu, 10 Jun 2021 07:14:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3eMUW9x1stkaG9D/YeYgpV7BE6hDJxv48nfPNnU5COg=; b=a9Vt2u1MqIN8t10bvqNHYk5UQbr1ArrW66AFdUTxWX80bAE+3k73q4RygSmYM73f/I 1hJ+Lf1v0GPtmBkF5FIumqnoT5sDeFIijqgwz9xjwwRFaKvtp+QBnFunHO/7YJsU29pV w7v9sFx5ZQ0HNtV8SW+qIU77jDkPPJBVVusTWhGKNqMMOZoYOIIH43N0ThP/vm1MbKLZ K1wol1Jz7qpLxbytFxnsfXXY2n58bbBKUWZVrKlDzBLnPP+a8ySlePZDKp1dRpWmZACw aVkccZfsEsRPq6IDEiqdRkeNIivkfLf3hOyLqP52dIfZsaL5phHwhG8o3lhXHd7IZ9iG k8bQ== X-Gm-Message-State: AOAM533OTMIz7VHbLipM7H8sFIY0+odSqukmVhZkYyd7mclRAxleA7LY u79pe4q3saUXTWxlxPwjr9/09pjmct8YllvTPTGUvtL6F3CFybBzz4wEkkIc/wCAdQYHAmJAc+w AUhSFGU2+qMtNRmgD62OMXIjs X-Received: by 2002:a05:622a:2cb:: with SMTP id a11mr5297929qtx.12.1623334478937; Thu, 10 Jun 2021 07:14:38 -0700 (PDT) X-Received: by 2002:a05:622a:2cb:: with SMTP id a11mr5297900qtx.12.1623334478641; Thu, 10 Jun 2021 07:14:38 -0700 (PDT) Received: from t490s (bras-base-toroon474qw-grc-88-174-93-75-200.dsl.bell.ca. [174.93.75.200]) by smtp.gmail.com with ESMTPSA id s133sm2293208qke.97.2021.06.10.07.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 07:14:37 -0700 (PDT) Date: Thu, 10 Jun 2021 10:14:36 -0400 From: Peter Xu To: "Kirill A. Shutemov" Cc: Hugh Dickins , Andrew Morton , "Kirill A. Shutemov" , Yang Shi , Wang Yugui , Matthew Wilcox , Alistair Popple , Ralph Campbell , Zi Yan , Will Deacon , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/11] mm: page_vma_mapped_walk(): use page for pvmw->page Message-ID: References: <589b358c-febc-c88e-d4c2-7834b37fa7bf@google.com> <88e67645-f467-c279-bf5e-af4b5c6b13eb@google.com> <20210610085522.f5ffyejzn3xtqark@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210610085522.f5ffyejzn3xtqark@box.shutemov.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 10, 2021 at 11:55:22AM +0300, Kirill A. Shutemov wrote: > > @@ -234,9 +233,9 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw) > > return true; > > next_pte: > > /* Seek to next pte only makes sense for THP */ > > - if (!PageTransHuge(pvmw->page) || PageHuge(pvmw->page)) > > + if (!PageTransHuge(page) || PageHuge(page)) > > return not_found(pvmw); > > - end = vma_address_end(pvmw->page, pvmw->vma); > > + end = vma_address_end(page, pvmw->vma); > > do { > > pvmw->address += PAGE_SIZE; > > if (pvmw->address >= end) > > I see two more pvmw->page in this loop. Do you leave them here as the code > will be rewritten later in the patchset? I think they've got removed in previous series ("[PATCH v2 04/10] mm/thp: fix vma_address() if virtual address below file offset"). Reviewed-by: Peter Xu -- Peter Xu