From: John Hubbard <jhubbard@nvidia.com>
To: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Linuxarm <linuxarm@huawei.com>,
Ralph Campbell <rcampbell@nvidia.com>,
John Garry <john.garry@huawei.com>
Subject: Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS
Date: Sat, 7 Nov 2020 11:16:51 -0800 [thread overview]
Message-ID: <e6b74390-6a80-9aae-17b2-536ffa0d1aae@nvidia.com> (raw)
In-Reply-To: <9286e2d0e17a47a1874dc4a96d83a38f@hisilicon.com>
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
next prev parent reply other threads:[~2020-11-07 19:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 10:05 [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS Barry Song
2020-11-07 0:12 ` John Hubbard
2020-11-07 19:05 ` Song Bao Hua (Barry Song)
2020-11-07 19:16 ` John Hubbard [this message]
2020-11-07 22:20 ` Randy Dunlap
2020-11-08 0:03 ` John Hubbard
2020-11-08 0:24 ` Randy Dunlap
2020-11-08 1:10 ` John Hubbard
2020-11-08 2:58 ` Song Bao Hua (Barry Song)
2020-11-08 3:14 ` John Hubbard
2020-11-08 3:22 ` John Hubbard
2020-11-08 4:11 ` Randy Dunlap
2020-11-08 4:34 ` Song Bao Hua (Barry Song)
2020-11-08 4:55 ` John Hubbard
2020-11-08 7:35 ` Song Bao Hua (Barry Song)
2020-11-08 7:53 ` John Hubbard
2020-11-08 4:05 ` Song Bao Hua (Barry Song)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6b74390-6a80-9aae-17b2-536ffa0d1aae@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxarm@huawei.com \
--cc=rcampbell@nvidia.com \
--cc=song.bao.hua@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).