Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp491583pxj; Fri, 11 Jun 2021 04:26:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxys+BFd7IBqDU7Z60CeF2oCH2IWEzQnEqRUIKrkqoIQmP8cp/aB8HEq34CRRlp2oULkTW4 X-Received: by 2002:a17:906:a850:: with SMTP id dx16mr3208679ejb.333.1623410808936; Fri, 11 Jun 2021 04:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623410808; cv=none; d=google.com; s=arc-20160816; b=iPUCgW2i7fJOtlB6P1//7Dx8WLIyg+PxMIqa4xzufwnRFoJWf1MPsGpKmD0Uu408Eb hboZKkyAXrP8d5MG17/UumcCANbP4KYTeqZSdx+IQV77kcjeEExp+YpZmTr9DNL4zETD zersRqwjxw0e45lsd5yYt0I+GKggR5dpE9A1ol0paCffX07fH81GKfBRyXPC4eewldDE URVb2r5mVe9UJThh5zTdzsjZTj/nrGrtx5G8tsDyC2pWfpqFOd2HH4xnPtboC3j97TC7 IQiY4VvGSjcy1/KCtSstViMKEsHAcTVgoVLI3hAvr6XdJm1Eg398o4VdVR60CMibg4d7 mwaQ== 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=USSio9uT559EwLMdaKvg28/LlsSRVZgA7+FGi03yDYA=; b=lsVhADJuuWwm9AUYPEIJkDjyP9OroXugsON8D51NQlk04fhCwWdTKVFf6vQ0pTHs5Q HGrrEFJcV4l3bwyRF5hoKgEiJOhsuysR5GjffTDJx88xWrDayi+2dLKkjsHO9LKFP/VX Z4Xx7yPnzQZWlKm5YlO3pudrm9CrNnUoRAn6p16ZmZop4sLK6ZJ92iY01Aqu4SLw3oIr u9cMqkqM0Bh6TUgbGuICIhnb6jxJPi5YlbQ7OtJ3B4rlmJMq4ihQ7hgNbQWwKWPQoeQM LMBS3i+Lf8A0YnUpUn0wvE9eNPAHZoYMMAE+H6IbHjZ0dkvGPfEOezX1H2IzXCTAhMsb Ey3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=FwrhWsc7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si4385968eds.420.2021.06.11.04.26.25; Fri, 11 Jun 2021 04:26:48 -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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=FwrhWsc7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231495AbhFKLZU (ORCPT + 99 others); Fri, 11 Jun 2021 07:25:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231268AbhFKLZT (ORCPT ); Fri, 11 Jun 2021 07:25:19 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0D1EC061574 for ; Fri, 11 Jun 2021 04:23:21 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id a19so5994444ljq.12 for ; Fri, 11 Jun 2021 04:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=USSio9uT559EwLMdaKvg28/LlsSRVZgA7+FGi03yDYA=; b=FwrhWsc7b4Vs/42jyQUSXkZj44OmfEXJ0TkZPCE79YRCLIRKnz4T85V8s2L7HlQWlO +rHS5FqVNh9EPY3SYHx0TK1Nz2jttXdjNum4wilnF4F3V5EPoonyS54VZyP98w78NmMU T0leseF3I+u27ECRRkzKRqXSMI4q4wSPJ/vzYSiVlMT4vECDJPj6FdBlHdkki/rvQTFC 7Gz3GfIieChVHhCTTtmBPK85e95wFK6upIgKfhS1IZ/UsYSPumObml0q/KUflkfMXB4O WV6QpPa94kYVtu5z4AGjW/vUfcCOQ2YwBe+KrbPODsWwCiYJG58ya7oRjH+dDZTYDHEP GYxA== 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=USSio9uT559EwLMdaKvg28/LlsSRVZgA7+FGi03yDYA=; b=e4LjbGdPSYcHVh7m+7MUmujczRIsI2BS5iqCCbupd3HTPM0en0NAeLiKdmqVUuhbTI AbBBMm/wh90pw4vxt33dNDx1sainXRWXbyhlaGzPNPJ9UTmurKVCfahDh3k1RPMQsBlZ S4EIL5NQBrrALk8Pe5cACiOBkgLAXZbfhmbCBNfjnVp1ebsX7lZQ0CcqvDgIt7IxpTnh cnoTO4KNLxeAClbzywUkqTUHxVhMcUGvtFNXpErQPXYpODyRbHR0hIpBNbnQLF6Jsy1S dXrcNOGqWEKToNQDv88//JAO0UpB11kk2Nzd5X/0TTZAqLQIjZ1fUD1lZwmjhkHHe8O+ vOXQ== X-Gm-Message-State: AOAM530fyQT3limzmGPcyIILP2Er/loFasVxdlnwUP210cL9P1PN+vx6 r/YLpPogGuAmjpH3xqdx/ONQoA== X-Received: by 2002:a05:651c:1697:: with SMTP id bd23mr2632917ljb.148.1623410600127; Fri, 11 Jun 2021 04:23:20 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id q126sm678515ljq.111.2021.06.11.04.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 04:23:19 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 0317D1027DC; Fri, 11 Jun 2021 14:23:35 +0300 (+03) Date: Fri, 11 Jun 2021 14:23:35 +0300 From: "Kirill A. Shutemov" To: Hugh Dickins Cc: Andrew Morton , "Kirill A. Shutemov" , Yang Shi , Wang Yugui , Matthew Wilcox , Alistair Popple , Ralph Campbell , Zi Yan , Peter Xu , Will Deacon , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/11] mm: page_vma_mapped_walk(): crossing page table boundary Message-ID: <20210611112335.37sno6wwbsef6zen@box.shutemov.name> References: <589b358c-febc-c88e-d4c2-7834b37fa7bf@google.com> <799b3f9c-2a9e-dfef-5d89-26e9f76fd97@google.com> <20210610093203.x42jpifagiavmrlp@box.shutemov.name> <4679ec74-80a-ed13-e58e-654911fbab28@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4679ec74-80a-ed13-e58e-654911fbab28@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 10, 2021 at 04:02:47PM -0700, Hugh Dickins wrote: > On Thu, 10 Jun 2021, Kirill A. Shutemov wrote: > > On Wed, Jun 09, 2021 at 11:44:10PM -0700, Hugh Dickins wrote: > > > page_vma_mapped_walk() cleanup: adjust the test for crossing page table > > > boundary - I believe pvmw->address is always page-aligned, but nothing > > > else here assumed that; > > > > Maybe we should just get it aligned instead? (PMD_SIZE - PAGE_SIZE) is not > > most obvious mask calculation. > > Would you prefer it with another line of comment after the > /* Did we cross page table boundary? */ > > Maybe, > /* Is address always page-aligned? No need to assume that. */ > > I just don't see the point in forcing alignment when the test is good > (and don't know for sure whether address is always aligned there or not). > > I prefer to leave it as is, just letting the commit message document it. Okay. Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov