From patchwork Thu Dec 10 00:43:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 11962959 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 980E6C4361B for ; Thu, 10 Dec 2020 00:43:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1656323CD4 for ; Thu, 10 Dec 2020 00:43:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1656323CD4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6CC816B005D; Wed, 9 Dec 2020 19:43:41 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 67E946B0068; Wed, 9 Dec 2020 19:43:41 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4AC6A6B006C; Wed, 9 Dec 2020 19:43:41 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0167.hostedemail.com [216.40.44.167]) by kanga.kvack.org (Postfix) with ESMTP id 2CA696B005D for ; Wed, 9 Dec 2020 19:43:41 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E87948249980 for ; Thu, 10 Dec 2020 00:43:40 +0000 (UTC) X-FDA: 77575524600.23.hill03_5e14469273f4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id C683F37606 for ; Thu, 10 Dec 2020 00:43:40 +0000 (UTC) X-HE-Tag: hill03_5e14469273f4 X-Filterd-Recvd-Size: 4426 Received: from mail-qv1-f67.google.com (mail-qv1-f67.google.com [209.85.219.67]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Thu, 10 Dec 2020 00:43:40 +0000 (UTC) Received: by mail-qv1-f67.google.com with SMTP id s6so1623670qvn.6 for ; Wed, 09 Dec 2020 16:43:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=YDDAi2s6I9irj1eFCp+Xpz5CYfQrtxxsgY8jH6RM458=; b=Nk+AuTMfxQ6BbAHmfpjqdXSFnw1CX0GCnpt5Rtr+S5ZZHzRoxhUkXzjSaLBFo9FKnP +IGv/oMQZ60Z5oFcu+WcBKLRJVlJIYOStwwQhx8A63/pkfbIk01AMMQrVYLFm122JdCB ZhbhX33sTQJUJplzJA2KCaOHlmGycGbsVHpDDZmMcTiFO6zgEcZ5bn3oKR/nhS7NmGXE lSUNz94k7ztCGv2c6TPO+oYZAaXQIIpJzaTSorVPYYAS5rRfsh2MWxhI1wbtSM8fm6SD ty0uVYq1b+GXDXOHEDRKOXvQB09Qf6VhbIcqJueEsD6VjWHJFlCxwCjTIUSuBPWyseQi q3JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YDDAi2s6I9irj1eFCp+Xpz5CYfQrtxxsgY8jH6RM458=; b=mGloXlfBvxYZe8kVcbjwttOVZ98jPXull8kmjT3WJHp3TBgRrWbzTcPsaft11+dWjG Fyt4awHiJo5IdurrxSg1fyre74Svp0ddH28Ta3tXN1PKHy3bOj2nBPwqlDKOJ4kE9CAB DHZ8GUEr3xS7wRSq100cSgKese/tOV89f/MgDPSv0XPOip5ohFb5tcZFImqghMV5Z0tF mZ2s+ET3REgivlJlTOzsfs/4Kc64lOpj2lWhmKGpzhBw8Pn106UUSS82QkB4+DKlTh20 mpacZ7fcgeMt50mAomaaG/q5zPF11T0NMuLVy8POQdil+OiNlM26m7vk15GHDTwHK4fZ RJXA== X-Gm-Message-State: AOAM533V0u+gb5GNQdPezAV8OXqbZZFIk8btVg6WZ1M0TrB+1EZtHUaJ pM2vXfc/o8+EEFKg82WGtilEAw== X-Google-Smtp-Source: ABdhPJzAa7q5sUByKWOSFZ0Py2q3Uc376O6i1oNIXW+AdlNdeOTECHVZXZpiUJYIRGDv8y9xQIyh+Q== X-Received: by 2002:ad4:4051:: with SMTP id r17mr5889435qvp.39.1607561019788; Wed, 09 Dec 2020 16:43:39 -0800 (PST) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id y1sm2538745qky.63.2020.12.09.16.43.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Dec 2020 16:43:39 -0800 (PST) From: Pavel Tatashin To: pasha.tatashin@soleen.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz, mhocko@suse.com, david@redhat.com, osalvador@suse.de, dan.j.williams@intel.com, sashal@kernel.org, tyhicks@linux.microsoft.com, iamjoonsoo.kim@lge.com, mike.kravetz@oracle.com, rostedt@goodmis.org, mingo@redhat.com, jgg@ziepe.ca, peterz@infradead.org, mgorman@suse.de, willy@infradead.org, rientjes@google.com, jhubbard@nvidia.com, linux-doc@vger.kernel.org Subject: [PATCH v2 1/8] mm/gup: perform check_dax_vmas only when FS_DAX is enabled Date: Wed, 9 Dec 2020 19:43:28 -0500 Message-Id: <20201210004335.64634-2-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201210004335.64634-1-pasha.tatashin@soleen.com> References: <20201210004335.64634-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 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: 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 Reviewed-by: John Hubbard Reviewed-by: Pankaj Gupta --- 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,