Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11501527ybi; Thu, 25 Jul 2019 17:58:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbNmA5EqLdMhG20tDIB796nNg4zswe2nLjbwrBp14T5nsNwCDIImwCnj7Y8Rq+RWCsu5Pa X-Received: by 2002:a65:6448:: with SMTP id s8mr89246347pgv.223.1564102723020; Thu, 25 Jul 2019 17:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564102723; cv=none; d=google.com; s=arc-20160816; b=GfpO80Bzz4FgVE0OQO0sEKb22SSPhJOgxnO9Idnb07QusW2+DG6dx9FfzIwHlVNEh+ q5PK/bPmrZi4ZnM0/s1XWfkDPm1T/aKqGhW3rgt9+I/hgGXBb2Af5EHcfrZCbPFOkWNZ KnR1b30LtOlza5d4jfS6wpyQaQH6ZyEuRFwORX3quvlURj5HcYmCMd+yMWxJwwi7ToIe 98L3h0R4Vy1DAwzB+MzwvvCwiFZl2OzpMaF2ut4xpWXpS861JEI0beoLP7a2nSYpFwjl wK/ru0y2yDYstcuXC/sMrqxesYG2WGPa2NkeeK4uHH9OJs5PEpFx1heVtLTiFK9t/uuE Cr5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=D2MJs2fZHD43Md8ZpV6DlNuTDZTSVoq5UF6AxcLBY88=; b=WAJjxlwVCMqvHeTq9YFz/kxEjKAIQMa4527c64r1N6aeLFBAvNLEo+lX7UsinoSNPJ qoX4ByDw8mRkziWVVuvvZQRI75mirAf/W2quvRdk0iM9fJB4ZMr+/Z9dzL6Lv5cGvRcz GF+banDPuRvm075z2m0T4rzExFi3j9iYwwD3mVDxqqXhiuR6OrJwaQxJq39Sg34ilCwE hENOTDHk0cB0j//rEnflbNmvZlty24ekOa9rN4e8icMDahzjC28wSXD4QF7qRJmna0RQ C7B2/flKUL6cRki4+ytIM2/rIuB5jIEgZrEAOf1bQBMaPNgl52ce10Dbl5UnT2vbL1T7 32Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=dDhXdZ0f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si4900362pgp.348.2019.07.25.17.58.28; Thu, 25 Jul 2019 17:58:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=dDhXdZ0f; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727339AbfGZA5Y (ORCPT + 99 others); Thu, 25 Jul 2019 20:57:24 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:11343 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727290AbfGZA5P (ORCPT ); Thu, 25 Jul 2019 20:57:15 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 25 Jul 2019 17:57:15 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 25 Jul 2019 17:57:14 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 25 Jul 2019 17:57:14 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 26 Jul 2019 00:57:13 +0000 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 26 Jul 2019 00:57:08 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 26 Jul 2019 00:57:08 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Thu, 25 Jul 2019 17:57:08 -0700 From: Ralph Campbell To: CC: , , , , "Ralph Campbell" , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Jason Gunthorpe , Christoph Hellwig Subject: [PATCH v2 6/7] mm/hmm: remove hugetlbfs check in hmm_vma_walk_pmd Date: Thu, 25 Jul 2019 17:56:49 -0700 Message-ID: <20190726005650.2566-7-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190726005650.2566-1-rcampbell@nvidia.com> References: <20190726005650.2566-1-rcampbell@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1564102635; bh=D2MJs2fZHD43Md8ZpV6DlNuTDZTSVoq5UF6AxcLBY88=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Type:Content-Transfer-Encoding; b=dDhXdZ0fq+/bJJsVQCR7FJrU8TlXvz2itR9WvHA+D+zGwHRjQv48omdl45RnxXmpB lVwB46LJQ7I1jmYZq8f2HDTONx4QL6yNAHgoDlCDzhsrayuWPJZUlqCiHsvrejtQAo IzffaEtC6GLs+mrZgw+/TfanZcDKiKjQzJg6UcKUCcQzs0xxBR7vdmXnZdWx1QuO65 lsl3wTSKpIjNMBnruP2rDqPtA1oWApYCh1VuHm12T+FlHh0ONlL8rrfRqIuenKDf4H l85a/V9vbnHfXJYcg4Hz8fOoowAC4ZLQH9YSs7dtBwWkS9sagT3o5JY0D0Y19kfUqB dfO9F2MBE+xGg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org walk_page_range() will only call hmm_vma_walk_hugetlb_entry() for hugetlbfs pages and doesn't call hmm_vma_walk_pmd() in this case. Therefore, it is safe to remove the check for vma->vm_flags & VM_HUGETLB in hmm_vma_walk_pmd(). Signed-off-by: Ralph Campbell Cc: "J=C3=A9r=C3=B4me Glisse" Cc: Jason Gunthorpe Cc: Christoph Hellwig --- mm/hmm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index 838cd1d50497..29f322ca5d58 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -630,9 +630,6 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp, if (pmd_none(pmd)) return hmm_vma_walk_hole(start, end, walk); =20 - if (pmd_huge(pmd) && (range->vma->vm_flags & VM_HUGETLB)) - return hmm_pfns_bad(start, end, walk); - if (thp_migration_supported() && is_pmd_migration_entry(pmd)) { bool fault, write_fault; unsigned long npages; --=20 2.20.1