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.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 9652EC388F9 for ; Sat, 7 Nov 2020 22:21:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7FD952220B for ; Sat, 7 Nov 2020 22:21:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="qexLaU9E" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FD952220B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 936886B0036; Sat, 7 Nov 2020 17:21:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8BE356B005D; Sat, 7 Nov 2020 17:21:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 786DB6B0068; Sat, 7 Nov 2020 17:21:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 47A806B0036 for ; Sat, 7 Nov 2020 17:21:21 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id DECE5181AEF00 for ; Sat, 7 Nov 2020 22:21:20 +0000 (UTC) X-FDA: 77459044320.03.horse15_3616d12272de Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id C202F28A4E8 for ; Sat, 7 Nov 2020 22:21:20 +0000 (UTC) X-HE-Tag: horse15_3616d12272de X-Filterd-Recvd-Size: 4091 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Sat, 7 Nov 2020 22:21:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=bu8yT7HYn3OwlgueptTlX3p5x8+22WhUMml2fA/1UvE=; b=qexLaU9EdvqFZJYsCPLzWkJ5XL ZO17Dbh/WcXqQDaWcXfLnTeUMSjE/4jGsxcxGvzfxHLXWEF66UlqzRAg/jnuyxZQwgyyQKwZXiRzd 8iB4DC57YVaQOrS09N0aE0ksVo1a1uivMqNh14SzadhuZUmXnY8GukpbZNRsiJwcdNeGRp97x8R3S KUIGajliM6aXx6IWFp1lnyDvwCJlXf7SYiNUJybZ5c8Y1PiBtoXxSSp7uLdZXhngbDA54t9YuhePe MTYyibatSobwG/KT64edht5NufqLNeZBvFDy721cN7ikHmn629+SyznrNCswnqjek/YPhg/S7eU+E GhA7eALA==; Received: from [2601:1c0:6280:3f0::a1cb] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbWZw-0005yX-Ad; Sat, 07 Nov 2020 22:21:00 +0000 Subject: Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS To: John Hubbard , "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: Randy Dunlap Message-ID: Date: Sat, 7 Nov 2020 14:20:56 -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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable 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:16 AM, John Hubbard wrote: > On 11/7/20 11:05 AM, Song Bao Hua (Barry Song) wrote: >>> -----Original Message----- >>> From: John Hubbard [mailto:jhubbard@nvidia.com] > ... >>>> =C2=A0=C2=A0 config GUP_BENCHMARK >>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bool "Enable infrastructure for= get_user_pages() and related calls >>> benchmarking" >>>> +=C2=A0=C2=A0=C2=A0 depends on DEBUG_FS >>> >>> >>> I think "select DEBUG_FS" is better here. "depends on" has the obnoxi= ous >>> behavior of hiding the choice from you, if the dependencies aren't al= ready 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 >> >> =C2=A0=C2=A0=C2=A0=C2=A0select should be used with care. select will f= orce >> =C2=A0=C2=A0=C2=A0=C2=A0a symbol to a value without visiting the depen= dencies. >> =C2=A0=C2=A0=C2=A0=C2=A0By abusing select you are able to select a sym= bol FOO even >> =C2=A0=C2=A0=C2=A0=C2=A0if FOO depends on BAR that is not set. >> =C2=A0=C2=A0=C2=A0=C2=A0In general use select only for non-visible sym= bols >> =C2=A0=C2=A0=C2=A0=C2=A0(no prompts anywhere) and for symbols with no = dependencies. >> =C2=A0=C2=A0=C2=A0=C2=A0That will limit the usefulness but on the othe= r hand avoid >> =C2=A0=C2=A0=C2=A0=C2=A0the illegal configurations all over. >> >> On the other hand, in kernel there are 78 "depends on DEBUG_FS" and >> only 14 "select DEBUG_FS". >> >=20 > You're not looking at the best statistics. Go look at what *already* se= lects > DEBUG_FS, and you'll find about 50 items. Sorry, I'm not following you. I see the same 14 "select DEBUG_FS" as Barr= y. In general we don't want any one large "feature" (or subsystem) to be ena= bled by one driver. If someone has gone to the trouble to disable DEBUG_FS (or= whatever), then a different Kconfig symbol shouldn't undo that. --=20 ~Randy