From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00DCAC63777 for ; Thu, 3 Dec 2020 07:59:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 62C6020BED for ; Thu, 3 Dec 2020 07:59:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62C6020BED 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 52B896B0068; Thu, 3 Dec 2020 02:59:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B5E46B006C; Thu, 3 Dec 2020 02:59:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 37C696B006E; Thu, 3 Dec 2020 02:59:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id 1F0466B0068 for ; Thu, 3 Dec 2020 02:59:40 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id CFECC824999B for ; Thu, 3 Dec 2020 07:59:39 +0000 (UTC) X-FDA: 77551221678.16.feet02_1803f83273ba Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin16.hostedemail.com (Postfix) with ESMTP id AB789100E6903 for ; Thu, 3 Dec 2020 07:59:39 +0000 (UTC) X-HE-Tag: feet02_1803f83273ba X-Filterd-Recvd-Size: 3835 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Dec 2020 07:59:38 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Wed, 02 Dec 2020 23:59:37 -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 07:59:30 +0000 Subject: Re: [PATCH 1/6] mm/gup: perform check_dax_vmas only when FS_DAX is enabled To: Pavel Tatashin , , , , , , , , , , , , , , , , , , , References: <20201202052330.474592-1-pasha.tatashin@soleen.com> <20201202052330.474592-2-pasha.tatashin@soleen.com> From: John Hubbard Message-ID: Date: Wed, 2 Dec 2020 23:59:30 -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-2-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=1606982377; bh=uipdsnFR3vsfE+3SRgmX/F8BCY4jFybcQkfThgPlIMI=; 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=TQIsGgED/40CjvuD1Xosm5duWI0sKLGdpiy19u6tW5tWagbDrXfi/Ei8goPG9fhKN G5yLRSnuq1t/tO8Nfgik3qFHLP42gN3z04pw2OrPPN1CbWLQWpYxEEiTaufj9/Mzr7 j2m1iSNbtkOSy+ws7Dksfnkyp68j24af1+8FxLv6b81THzgguKOwZPCYcmwVDoCUoe Fkyo+nK8mHB3IJ+zhx/uVssUKgX0y5bGmiwhDNQtu+BbSiw4EdjjJbYFKdrWJB3/pn kdK0rBZc65SWbM6cUoJqKrD5VWIvG9Nq6daLl2iWKlAZSjxqUY5rzLxG7u8g1qyKAJ K1sOoC8oiQDGA== 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: On 12/1/20 9:23 PM, Pavel Tatashin wrote: > There is no need to check_dax_vmas() and run through the npage loop of > pinned pages if FS_DAX is not enabled. > > Add a stub check_dax_vmas() function for no-FS_DAX case. > > Signed-off-by: Pavel Tatashin > --- > mm/gup.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/mm/gup.c b/mm/gup.c > index 98eb8e6d2609..cdb8b9eeb016 100644 > --- a/mm/gup.c > +++ b/mm/gup.c > @@ -1568,6 +1568,7 @@ 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) > { > long i; > @@ -1586,6 +1587,12 @@ static bool check_dax_vmas(struct vm_area_struct **vmas, long nr_pages) > } > return false; > } > +#else > +static bool check_dax_vmas(struct vm_area_struct **vmas, long nr_pages) > +{ > + return false; > +} > +#endif > > #ifdef CONFIG_CMA > static long check_and_migrate_cma_pages(struct mm_struct *mm, > Looks obviously correct, and the follow-up simplication is very nice. Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA