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=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,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 AFAFDC2D0A3 for ; Mon, 9 Nov 2020 07:46:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 16CA120853 for ; Mon, 9 Nov 2020 07:46:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="d5ei2FuM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16CA120853 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 717866B0036; Mon, 9 Nov 2020 02:46:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C67C6B005D; Mon, 9 Nov 2020 02:46:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B5C86B0068; Mon, 9 Nov 2020 02:46:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id 2A8B06B0036 for ; Mon, 9 Nov 2020 02:46:05 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C01E5180AD802 for ; Mon, 9 Nov 2020 07:46:04 +0000 (UTC) X-FDA: 77464096248.13.slip63_2b11fdc272ea Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id A1FAE18140B69 for ; Mon, 9 Nov 2020 07:46:04 +0000 (UTC) X-HE-Tag: slip63_2b11fdc272ea X-Filterd-Recvd-Size: 3765 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Mon, 9 Nov 2020 07:46:03 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 08 Nov 2020 23:46:06 -0800 Received: from [10.2.49.75] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 9 Nov 2020 07:45:57 +0000 Subject: Re: [PATCH v2] mm/gup_test: GUP_TEST depends on DEBUG_FS To: Barry Song , , , CC: , Ralph Campbell , Randy Dunlap , John Garry References: <20201108083732.15336-1-song.bao.hua@hisilicon.com> From: John Hubbard Message-ID: Date: Sun, 8 Nov 2020 23:45:57 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201108083732.15336-1-song.bao.hua@hisilicon.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=1604907966; bh=SdZB+6OvR+B2m6Dr8AYTdQURpW4L9D2aslhmIOhFRFc=; h=Subject:To:CC: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=d5ei2FuMITj7tyXBKpA5nYPJ5X9cK8bsxQmZjka6pWKPNmoespYSTPkCxr4Fe58HV oaWFayBcFPbXfsPsmmAoK0JoDEcICmeuwt0BcImwTMb5usNY+lJd46sxMB+HWCee0q 28wRkgqh4foqfZnXpjffvtaQHsxKp6GWtLxnTF+u9vkTI9ONgmFJsdlM8fxLEd+tVP zG8ruJMqHExQYxoyub1A34GC+MPrypnG6v26UnMGj+4bwz+WmIryDPL+UvTbE+4vDq Vi31EAk7HiJnz5mAgtGgpfMk1+zk1s6kxbspbZWw0wSH1MCba06eJRf2vUbMdNKL4S 4JlyYPaFBex1g== 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 11/8/20 12:37 AM, Barry Song wrote: > Without DEBUG_FS, all the code in gup_test 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. > > Cc: John Hubbard > Cc: Ralph Campbell > Cc: Randy Dunlap > Suggested-by: John Garry > Signed-off-by: Barry Song > --- > -v2: > add comment as a prompt to users as commented by John and Randy, thanks! > > mm/Kconfig | 4 ++++ > 1 file changed, 4 insertions(+) Thanks for suffering through a lot of discussion about this! Reviewed-by: John Hubbard thanks, -- John Hubbard NVIDIA > > diff --git a/mm/Kconfig b/mm/Kconfig > index 01b0ae0cd9d3..a7ff0d31afd5 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -836,6 +836,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 > @@ -853,6 +854,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 > >