Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3026127pxb; Sun, 8 Nov 2020 23:48:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZk7dwtnWm9XfnigshspyWBASJKkQVos5cbLDKanYY2FoB3uNsppr/VhOWV2rDDs7SBcr4 X-Received: by 2002:a17:906:b043:: with SMTP id bj3mr13441278ejb.338.1604908109885; Sun, 08 Nov 2020 23:48:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604908109; cv=none; d=google.com; s=arc-20160816; b=clEP+swq26AzZnySZMEzuEgQVDoEGP0X46z5iztoVLu3Nah78a7CwR4uHgFO3P/Pfq BB2l9AV1+ifnrMIycuRR60ipo9W5gEFKB6Fx0o1KLgH6+/AHc8Ple4GIgTYVmmKEpEUP FZadIOt4zQbhO33UKKxJQT/FzmIHFN63VIjoQyJ1Ad5WD2Ymoxrrd5C+uOunkpMk55Ti A6BiObNRruUKg5DaCRf/PxdoOKh/QfPdk2/4sUaf9K9qdeBXeLE+X4vaWt9xbK3ttc3R 90Efllr+rTGOQ5NaLhGYwEg9yTzmcfj53ob5me7PWkZQcW57QP48DNzWwaYaLcFIkgbh L0wg== 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:cc:to:subject; bh=SdZB+6OvR+B2m6Dr8AYTdQURpW4L9D2aslhmIOhFRFc=; b=HZTNpo/CTuWdezZsbodEBAHGVjXSFqx6iag2VrZwKsAY6M/Y7f+qy0tvomgCrcnQlO EkWtuurc726HFua7T9E0PV3cN7FxWD/QXuUF7X8mqvEZEWpwptamdPow0m96cZmkrFM/ iE2QG8QjTw82R1jg0ihDR6qQzCzS02PB49vgO7agFSc9xJe1zd3WBxOSrhLMTiGawgRx Thk8ezKpz+jkS+3ienrwclb0ux7PYHJ5M2Tuy7BU0PCvjNowAOqnXOuoxKC4tumqur8Z GY/mXdHVWlvQbFymY2fgJnt6sSm/o+Z+E3gfz/HOKUyt0gSw6Oo88xad7hAgZz9wYoDf llAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=d5ei2FuM; 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 z2si6442946ejr.636.2020.11.08.23.48.06; Sun, 08 Nov 2020 23:48:29 -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=d5ei2FuM; 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 S1729313AbgKIHqD (ORCPT + 99 others); Mon, 9 Nov 2020 02:46:03 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:2863 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728038AbgKIHqC (ORCPT ); Mon, 9 Nov 2020 02:46:02 -0500 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >