From patchwork Tue Jan 7 21:12:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Campbell X-Patchwork-Id: 11321807 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BB275139A for ; Tue, 7 Jan 2020 21:12:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 725AA208C4 for ; Tue, 7 Jan 2020 21:12:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="Nq9cz4aO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 725AA208C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A0DA18E0005; Tue, 7 Jan 2020 16:12:36 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9BE098E0001; Tue, 7 Jan 2020 16:12:36 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FBCE8E0005; Tue, 7 Jan 2020 16:12:36 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id 78FDF8E0001 for ; Tue, 7 Jan 2020 16:12:36 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 271F72473 for ; Tue, 7 Jan 2020 21:12:36 +0000 (UTC) X-FDA: 76352087112.04.nail82_50d7ccef06230 X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,rcampbell@nvidia.com,::linux-kernel@vger.kernel.org:jglisse@redhat.com:jhubbard@nvidia.com:hch@lst.de:jgg@mellanox.com:bharata@linux.ibm.com:mhocko@kernel.org:akpm@linux-foundation.org:rcampbell@nvidia.com,RULES_HIT:30003:30054:30064,0,RBL:216.228.121.143:@nvidia.com:.lbl8.mailshell.net-62.18.0.100 64.10.201.10,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: nail82_50d7ccef06230 X-Filterd-Recvd-Size: 3941 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Jan 2020 21:12:35 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 07 Jan 2020 13:11:46 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 07 Jan 2020 13:12:34 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 07 Jan 2020 13:12:34 -0800 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 7 Jan 2020 21:12:32 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 7 Jan 2020 21:12:32 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Tue, 07 Jan 2020 13:12:32 -0800 From: Ralph Campbell To: , CC: Jerome Glisse , John Hubbard , Christoph Hellwig , Jason Gunthorpe , "Bharata B Rao" , Michal Hocko , Andrew Morton , Ralph Campbell Subject: [PATCH 1/3] mm/migrate: remove useless mask of start address Date: Tue, 7 Jan 2020 13:12:06 -0800 Message-ID: <20200107211208.24595-2-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200107211208.24595-1-rcampbell@nvidia.com> References: <20200107211208.24595-1-rcampbell@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1578431506; bh=X07NHQHfINZSy9Ul0OISn+znOiJPanChRLHVsYFl+U8=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=Nq9cz4aO8SlJFu4Dhi6OI2sNInBftzuKYW9D0C77YmHu/geUOmbzDsQbWL8aHMI8C 21prDhIirty2yL6j7H18KUn0N2jDChCqAcRAXZqmWWJlloXQ53FpdOhFoJ8oyvzEPz /G/2D4d+cLmXSjFS00xucZcSDJuWmth12V0JErBHKEp7gta2I7b0waKPNV0gjh2QSg vs77sD7XRLZmXGTFZJIYr8EzVfWfTnEKSxkX6fcVmUdLo7khEb7kPbS9M3scinmfAW rLqbNkHRoLt1rC36zsYywxYzo4Q4sxeqCGXpTHX1xaoQcy7/ppoi0jNZdQ3SZ6V/CF IpOLYguY2ZJ1Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Addresses passed to walk_page_range() callback functions are already page aligned and don't need to be masked with PAGE_MASK. Signed-off-by: Ralph Campbell Reviewed-by: Christoph Hellwig --- mm/migrate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index ebe2bf070653..b7f5d9ada429 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -2136,7 +2136,7 @@ static int migrate_vma_collect_hole(unsigned long start, struct migrate_vma *migrate = walk->private; unsigned long addr; - for (addr = start & PAGE_MASK; addr < end; addr += PAGE_SIZE) { + for (addr = start; addr < end; addr += PAGE_SIZE) { migrate->src[migrate->npages] = MIGRATE_PFN_MIGRATE; migrate->dst[migrate->npages] = 0; migrate->npages++; @@ -2153,7 +2153,7 @@ static int migrate_vma_collect_skip(unsigned long start, struct migrate_vma *migrate = walk->private; unsigned long addr; - for (addr = start & PAGE_MASK; addr < end; addr += PAGE_SIZE) { + for (addr = start; addr < end; addr += PAGE_SIZE) { migrate->dst[migrate->npages] = 0; migrate->src[migrate->npages++] = 0; }