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=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 17FA6C388F9 for ; Sat, 7 Nov 2020 19:17:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 99618207C3 for ; Sat, 7 Nov 2020 19:17:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="VSTeVp6s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99618207C3 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 DF5816B005D; Sat, 7 Nov 2020 14:16:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DA5086B0068; Sat, 7 Nov 2020 14:16:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CBC366B006C; Sat, 7 Nov 2020 14:16:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0173.hostedemail.com [216.40.44.173]) by kanga.kvack.org (Postfix) with ESMTP id 9F53B6B005D for ; Sat, 7 Nov 2020 14:16:59 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 49A4F1EE6 for ; Sat, 7 Nov 2020 19:16:59 +0000 (UTC) X-FDA: 77458579758.04.point72_3d08443272dd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 2730B8005A8E for ; Sat, 7 Nov 2020 19:16:59 +0000 (UTC) X-HE-Tag: point72_3d08443272dd X-Filterd-Recvd-Size: 3951 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Sat, 7 Nov 2020 19:16:58 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sat, 07 Nov 2020 11:17:00 -0800 Received: from [10.2.62.222] (172.20.13.39) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 7 Nov 2020 19:16:51 +0000 Subject: Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS To: "Song Bao Hua (Barry Song)" , "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" CC: Linuxarm , Ralph Campbell , John Garry References: <20201104100552.20156-1-song.bao.hua@hisilicon.com> <9286e2d0e17a47a1874dc4a96d83a38f@hisilicon.com> From: John Hubbard Message-ID: Date: Sat, 7 Nov 2020 11:16:51 -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: <9286e2d0e17a47a1874dc4a96d83a38f@hisilicon.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [172.20.13.39] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1604776620; bh=z9G72tVup8O2A+uYCE4iLdEZGkH3YDL/9eIcfi0obdI=; 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=VSTeVp6sZVmnhQhQlDFisn89K+j+8nAB7GisZzjyfL7S/hIDw1iy2LltQSvlEbrKi BDkXqJVS5IY1gmD3d42SBwQVv+pairjUVG+mgf0XYBhVOLGPGQDZInC6g4Jqz14+NS 9gnnAtKJIGtdyfemMZxRMxuTsbwrTZMus+tlO/Riq/GpWbPzrwR9kkDm3LP5G9d5k0 sbIyjewaPH269z8K7SnsT6H4luXnxI/Cc9qlzPreJKVoRQM6anzAfKKxo9XPp/cjSk lPLdh297B1jAtj9JsvoJFiTQUTm4nfbzghxrjw+3qJPaVx8FkJ45At3omhDXjSwd3R obVLOzjmyBXJg== 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/7/20 11:05 AM, Song Bao Hua (Barry Song) wrote: >> -----Original Message----- >> From: John Hubbard [mailto:jhubbard@nvidia.com] ... >>> config GUP_BENCHMARK >>> bool "Enable infrastructure for get_user_pages() and related calls >> benchmarking" >>> + depends on DEBUG_FS >> >> >> I think "select DEBUG_FS" is better here. "depends on" has the obnoxious >> behavior of hiding the choice from you, if the dependencies aren't already met. >> Whereas what the developer *really* wants is a no-nonsense activation of the >> choice: "enable GUP_BENCHMARK and the debug fs that it requires". >> > > To some extent, I agree with you. But I still think here it is better to use "depends on". > According to > https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt > > select should be used with care. select will force > a symbol to a value without visiting the dependencies. > By abusing select you are able to select a symbol FOO even > if FOO depends on BAR that is not set. > In general use select only for non-visible symbols > (no prompts anywhere) and for symbols with no dependencies. > That will limit the usefulness but on the other hand avoid > the illegal configurations all over. > > On the other hand, in kernel there are 78 "depends on DEBUG_FS" and > only 14 "select DEBUG_FS". > You're not looking at the best statistics. Go look at what *already* selects DEBUG_FS, and you'll find about 50 items. thanks, -- John Hubbard NVIDIA