Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2160554pxb; Sat, 7 Nov 2020 11:18:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcVgRoiKyekG4ulHcXXU1vdmf4WP7PzM+A6GZldXJ8hkrUBUveBy77GtTWECNQjhV9DjhL X-Received: by 2002:a50:e705:: with SMTP id a5mr8097174edn.29.1604776736324; Sat, 07 Nov 2020 11:18:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604776736; cv=none; d=google.com; s=arc-20160816; b=QlbtTE9wrXqqSyPAvZcQwCmH030gIdNY/z47SOxvDERLFIjOVpHAWTtI2QvaeuUkdU PsOB/57LAch0uvoUOdiGZR8YLkS6yfLr2uDu/weDN7m7x8JBnah6cBX5OFDTSySdECxs vi8/IjZQLvPbfHX8zSGMC9+DprkFLG00wzyyOfeblOjyOZDdc3ntO/p38n8GhlXvfl8k VoGw7c1KzBkPp8V058ND0fs0ucCY2Lm+ARq3NpUMatCTPP8OFc6E9uouGHgmngCMlYsp 4qb5ig/jRrJlWbj6F5E1TEHzqtPXd2VswifqfW83AOtnqhp7z3iOfg2awdItTKNAtnUp 8Wqw== 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=z9G72tVup8O2A+uYCE4iLdEZGkH3YDL/9eIcfi0obdI=; b=XjIRcvqhAJlpvzV8le2OBObzeX3UaqIxwHEzT9C1bnovI+1Py6OKa95j5k6xbCEyqo 7RlKNOfkFyXIH05iUyEUkeuqJEMeipGNiaQTtIe8zJbu5P2FXDrP1AFFEhG22HNBq7cg a0D752dDCUJzOKxo5ssFuQGfwJ15Rq4ocJR37Yujoj/bdGuQTHdvrNr7WkAbpgtKnD/N 3wSgSbpxiznjk2z7kIMePKlzn7jPDS0RSO5FAnoZm8OL2nW/L9dbfeVT17xQp5NGILLe EridDeQsRJE3U0qTmElIcIoDgzWDqZv390m1TprTc+7dtWnddzw7bt6p52CImh3f15Zd K5fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=VSTeVp6s; 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 y12si3764690eds.22.2020.11.07.11.18.32; Sat, 07 Nov 2020 11:18:56 -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=VSTeVp6s; 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 S1728555AbgKGTQ5 (ORCPT + 99 others); Sat, 7 Nov 2020 14:16:57 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:5701 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725846AbgKGTQ5 (ORCPT ); Sat, 7 Nov 2020 14:16:57 -0500 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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