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 32AD1C4741F for ; Sun, 8 Nov 2020 04:12:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0D1E4207C3 for ; Sun, 8 Nov 2020 04:12:19 +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="pcPyqBTb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D1E4207C3 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 492156B0068; Sat, 7 Nov 2020 23:12:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 41B1D6B006C; Sat, 7 Nov 2020 23:12:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E2666B006E; Sat, 7 Nov 2020 23:12:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0119.hostedemail.com [216.40.44.119]) by kanga.kvack.org (Postfix) with ESMTP id EDF976B0068 for ; Sat, 7 Nov 2020 23:12:18 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 8ED9E8249980 for ; Sun, 8 Nov 2020 04:12:18 +0000 (UTC) X-FDA: 77459928756.10.part44_200a8a4272e0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 6928916A0C3 for ; Sun, 8 Nov 2020 04:12:18 +0000 (UTC) X-HE-Tag: part44_200a8a4272e0 X-Filterd-Recvd-Size: 5048 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Sun, 8 Nov 2020 04:12:17 +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=S1QfwEXZWERFh3dXVORoV4Y0CO9ZM//Q2y9Wr8MwW70=; b=pcPyqBTbOetFrKo483fZE9mqVq 4xPY/Ydi6mciY63F3eOZK9IcDto1mHGAGJ4LXw+6ftYnWgmtwyYpk3PavPVzKTXwDVCRmLpjLjWNb QqPdF6IUGppT+9IyBEi5LziLBuZoHht10Zg/M43UsMWsX860108W+xasMdvhHvRfOMe6MIRJf13/o DLkwhHc82CHbltd7LSfeLREcScP58tUB3s7NCrwm3ck/yn6jfFQ9iD3voGYTMQdMpHaXGyj1EPD/v /uU+1k5CKGaBs09slzYS1p36JyAaJYapQixWh5zikftwMFIEiVdKp3e3g09ShVjMTJ3Pm6pYQEWq1 C+x8mutg==; Received: from [2601:1c0:6280:3f0::a1cb] by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kbc3c-0005Dg-Kt; Sun, 08 Nov 2020 04:12:01 +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> <2c968615-587c-b978-7961-8391c70382b2@nvidia.com> <869059977c224a3aa31bfb42a4a8148d@hisilicon.com> <8eaa47c0-a62d-46da-4fd6-93f2b5b2910d@nvidia.com> From: Randy Dunlap Message-ID: Date: Sat, 7 Nov 2020 20:11: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: <8eaa47c0-a62d-46da-4fd6-93f2b5b2910d@nvidia.com> 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 7:22 PM, John Hubbard wrote: > On 11/7/20 7:14 PM, John Hubbard wrote: >> On 11/7/20 6:58 PM, Song Bao Hua (Barry Song) wrote: >>>> On 11/7/20 2:20 PM, Randy Dunlap wrote: >>>>> On 11/7/20 11:16 AM, John Hubbard wrote: >>>>>> On 11/7/20 11:05 AM, Song Bao Hua (Barry Song) wrote: >>>>>>>> From: John Hubbard [mailto:jhubbard@nvidia.com] >>>>>> ... >>>> But if you really disagree, then I'd go with, just drop the patch en= tirely, because >>>> it doesn't really make things better as written...IMHO anyway. :) >>> >>> Just imagine a case, we don't enable DEBUG_FS but we enable GUP_TEST,= we will >>> get an image with totally useless code section since GUP_TEST depends= on debugfs >>> entry to perform any useful functionality. >>> >> >> Looking at the choices, from the user's (usually kernel developer's) e= xperience: >> >> a) The user enables GUP_TEST, then boots up, runs, and is briefly surp= rised by a >> runtime failure. But it's a very quick diagnosis: "open: No such file = or directory", >> when trying to make that ioctl call. The path indicates that it's a de= bug fs path, >> so the solution is pretty clear, at least for the main audience. >> >> b) The other choice: the user *never even sees* GUP_TEST as a choice. = This especially >> bothers me because sometimes you find things by poking around in the m= enu, although >> of course "you should already know about it"...but there's a lot to "a= lready know" >> in a large kernel. >> >> =C2=A0From a user experience, it's way better to simply see what you w= ant, and select it >> in the menu. Or, at least get some prompt that you need to pre-select = something else. >> >=20 > ...and again, this is all fallout from Kconfig. I might be missing some= advanced > feature, because it seems surprising to only be allowed to choose betwe= en > missing dependencies (which this patch would correct), or a poorer user= experience > (which I argue that this patch would also provide). >=20 > Ideally, we'd just set up the dependencies, and then have some options = for > visibility, but I'm not aware of any way to do that...and after a quick= peek > at Documentation/kbuild/kconfig-macro-language.rst it looks pretty bare= bones. Look at kconfig-language.rst instead. One thing that could be done (and is done in a few places for other reaso= ns) is to add a Kconfig comment if DEBUG_FS is not enabled: comment "GUP_TEST needs to have DEBUG_FS enabled" depends on !GUP_TEST && !DEBUG_FS e.g. drivers/hid/usbhid/Kconfig: comment "Input core support is needed for USB HID input layer or HIDBP su= pport" depends on USB_HID && INPUT=3Dn --=20 ~Randy