Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp306298pxu; Thu, 3 Dec 2020 00:07:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAOoCw3o9WCQj+KqDz0soNV1eaJ9XCvrDoNYFHNY6BhS4dN5C77ljxgr9yBFXsXx6/h6f3 X-Received: by 2002:a17:906:81ca:: with SMTP id e10mr1411111ejx.449.1606982843275; Thu, 03 Dec 2020 00:07:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606982843; cv=none; d=google.com; s=arc-20160816; b=t3CeUD/0bGnXCMC68eqwc8awDHVmxTJmoTapQXMbC6s3M1esh0e7hyJ8TcpB+xC+2c 4vHKUpk2E98ePIB5tuIewIWkSIGR0A6e95wELN7he8oLWuxEAc9JuZHU+pl0uWPRXidb VcLuKLRH4zGQI190VYnen3QtZZkNY/kh6z/6G30SOEijwyfZpuP1pRGDm3ZPFsOdlEMc UgTIU3s7OeAa9gdz8qUU8OMOqAmb/jSL/2as4lEroPPHH0CgTtpjd6WBkkCsCi2WWiSc +z+7P9hgcKCXB6mE2r/z0lqaKNFkiO+Ev9h0nB67ixAD6dcRNmZrnFaK/htyaAsUY40r i3cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=Vo2/dDhUo+zAUDkkaQyZUZa1C3Ei/RJHl3QQ0nBpBeQ=; b=S478j8rIub5+IHtKWmfTqV454/LKYcvoUMlmbAUbw4F8a74wzO+utQYvePY3RKdUVh geHYD8vgclId1kRY9mx7QUsz63goFLTwSFBBxIwXYxOBflQA9He2nINC5F9nncW5LtW5 IqDOmRyYsABtoom9zHiSGn+sdAWUWhUraZkq2+VL8VL03Qigxe0NJsE0RQHPxwgQX2xw PnmomILYPG+Q9k8bhK4JN1ZhK/y6VKccQmxeuGUF1YoWbphqObZ96dQ6OIRlMmyEOI9J GZB8Og1X1ChO0/rYe9QM5qnJRZB4JgjFzZaHJXBOsbugaW0kARSW1BQIMtor3wl5zcHQ 3Ozw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=fwOtTrKs; 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr24si624518ejb.482.2020.12.03.00.07.00; Thu, 03 Dec 2020 00:07:23 -0800 (PST) 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=@nvidia.com header.s=n1 header.b=fwOtTrKs; 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388109AbgLCID6 (ORCPT + 99 others); Thu, 3 Dec 2020 03:03:58 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:18611 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726451AbgLCID5 (ORCPT ); Thu, 3 Dec 2020 03:03:57 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 03 Dec 2020 00:03:17 -0800 Received: from [10.2.53.244] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 3 Dec 2020 08:03:11 +0000 Subject: Re: [PATCH 3/6] mm/gup: make __gup_longterm_locked common To: Pavel Tatashin , , , , , , , , , , , , , , , , , , , References: <20201202052330.474592-1-pasha.tatashin@soleen.com> <20201202052330.474592-4-pasha.tatashin@soleen.com> From: John Hubbard Message-ID: Date: Thu, 3 Dec 2020 00:03:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Thunderbird/83.0 MIME-Version: 1.0 In-Reply-To: <20201202052330.474592-4-pasha.tatashin@soleen.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1606982597; bh=Vo2/dDhUo+zAUDkkaQyZUZa1C3Ei/RJHl3QQ0nBpBeQ=; h=Subject:To:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=fwOtTrKs6mSMwDM+VKq21n3a8sIqq1l1c2VaftL0Nr4qXxSx1mci1th7pdqLEf7id wCHyu5ovMKDPH6l/MMLKY2PEruIDJAzylWfvvgUlwdEKAl9/srxjMxDjRbwxJkyifS XuWv8q8aUr3dr6RxUmaGqXXqGXU4Rd8xZ733Tjy/2jdYaGAtfKGCkluNboJV4V7wNT f7am0AXmRzr/cyQZxhMNvdEx0AFhGVV0C98bLiupV8XwTWCusyPVERFnuR5S9ad1pH wodX3xoGB16/G3/Fpg+tMx+0ZAcZd2rUoqYNc9xmmjhEbIu+j6uVy8lgXv6v6wPvcU DveVC8CPtNtxA== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/1/20 9:23 PM, Pavel Tatashin wrote: > __gup_longterm_locked() has CMA || FS_DAX version and a common stub > version. In the preparation of prohibiting longterm pinning of pages from > movable zone make the CMA || FS_DAX version common, and delete the stub > version. > > Signed-off-by: Pavel Tatashin > --- > mm/gup.c | 13 ------------- > 1 file changed, 13 deletions(-) > > diff --git a/mm/gup.c b/mm/gup.c > index 3a76c005a3e2..0e2de888a8b0 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -1567,7 +1567,6 @@ struct page *get_dump_page(unsigned long addr) > } > #endif /* CONFIG_ELF_CORE */ > > -#if defined(CONFIG_FS_DAX) || defined (CONFIG_CMA) > #ifdef CONFIG_FS_DAX > static bool check_dax_vmas(struct vm_area_struct **vmas, long nr_pages) > { > @@ -1757,18 +1756,6 @@ static long __gup_longterm_locked(struct mm_struct *mm, > kfree(vmas_tmp); > return rc; > } > -#else /* !CONFIG_FS_DAX && !CONFIG_CMA */ > -static __always_inline long __gup_longterm_locked(struct mm_struct *mm, > - unsigned long start, > - unsigned long nr_pages, > - struct page **pages, > - struct vm_area_struct **vmas, > - unsigned int flags) > -{ > - return __get_user_pages_locked(mm, start, nr_pages, pages, vmas, > - NULL, flags); > -} > -#endif /* CONFIG_FS_DAX || CONFIG_CMA */ > > static bool is_valid_gup_flags(unsigned int gup_flags) > { > At last some simplification here, yea! Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA