From patchwork Tue Dec 15 03:05:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 11973685 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 C8794C2BBCF for ; Tue, 15 Dec 2020 03:05:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 67CD1224B2 for ; Tue, 15 Dec 2020 03:05:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67CD1224B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AA2296B0096; Mon, 14 Dec 2020 22:05:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A53916B0098; Mon, 14 Dec 2020 22:05:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 943346B0099; Mon, 14 Dec 2020 22:05:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0164.hostedemail.com [216.40.44.164]) by kanga.kvack.org (Postfix) with ESMTP id 7E47E6B0096 for ; Mon, 14 Dec 2020 22:05:40 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 46A4B181AEF2A for ; Tue, 15 Dec 2020 03:05:40 +0000 (UTC) X-FDA: 77594026440.19.tub13_16081ef27420 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 2AC011ACEBC for ; Tue, 15 Dec 2020 03:05:40 +0000 (UTC) X-HE-Tag: tub13_16081ef27420 X-Filterd-Recvd-Size: 2683 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Dec 2020 03:05:39 +0000 (UTC) Date: Mon, 14 Dec 2020 19:05:38 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1608001538; bh=uZam2wyar1G/yseLKpY3GiqkPM4+jXiI6Hz4JEKz+Xk=; h=From:To:Subject:In-Reply-To:From; b=gjTH8UKFBx7ah6BYGDsRrQpiBtyRECOeVesByuovqDgHfKyiyGdGigXDsLS0/Uctc Zf5iRnsRFZt04Yc8I3k43TCRNeI9Oq6jKPvCqIUS1jW0X3ECAxVjA8+TC/4VLuQp9X wu1JfnLdSeioISX6LnUXfb31t3tOCzNPHay7BWZI= From: Andrew Morton To: akpm@linux-foundation.org, jhubbard@nvidia.com, john.garry@huawei.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, rcampbell@nvidia.com, rdunlap@infradead.org, song.bao.hua@hisilicon.com, torvalds@linux-foundation.org Subject: [patch 042/200] mm/gup_test: GUP_TEST depends on DEBUG_FS Message-ID: <20201215030538.mwTxJ3H3J%akpm@linux-foundation.org> In-Reply-To: <20201214190237.a17b70ae14f129e2dca3d204@linux-foundation.org> User-Agent: s-nail v14.8.16 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: From: Barry Song Subject: mm/gup_test: GUP_TEST depends on DEBUG_FS Without DEBUG_FS, all the code in gup_benchmark becomes meaningless. For sure kernel provides debugfs stub while DEBUG_FS is disabled, but the point here is that GUP_TEST can do nothing without DEBUG_FS. [song.bao.hua@hisilicon.com: add comment as a prompt to users as commented by John and Randy] Link: https://lkml.kernel.org/r/20201108083732.15336-1-song.bao.hua@hisilicon.com Link: https://lkml.kernel.org/r/20201104100552.20156-1-song.bao.hua@hisilicon.com Signed-off-by: Barry Song Suggested-by: John Garry Reviewed-by: John Hubbard Acked-by: Randy Dunlap Cc: Ralph Campbell Signed-off-by: Andrew Morton --- mm/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) --- a/mm/Kconfig~mm-gup_benchmark-gup_benchmark-depends-on-debug_fs +++ a/mm/Kconfig @@ -823,6 +823,7 @@ config PERCPU_STATS config GUP_TEST bool "Enable infrastructure for get_user_pages()-related unit tests" + depends on DEBUG_FS help Provides /sys/kernel/debug/gup_test, which in turn provides a way to make ioctl calls that can launch kernel-based unit tests for @@ -840,6 +841,9 @@ config GUP_TEST See tools/testing/selftests/vm/gup_test.c +comment "GUP_TEST needs to have DEBUG_FS enabled" + depends on !GUP_TEST && !DEBUG_FS + config GUP_GET_PTE_LOW_HIGH bool