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 C8931C388F7 for ; Sun, 8 Nov 2020 03:14:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2ECF720760 for ; Sun, 8 Nov 2020 03:14:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="ElQlL9uk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2ECF720760 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 55CFB6B0036; Sat, 7 Nov 2020 22:14:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 50E716B005D; Sat, 7 Nov 2020 22:14:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3FF236B0068; Sat, 7 Nov 2020 22:14:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 1018C6B0036 for ; Sat, 7 Nov 2020 22:14:15 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 905EF181AEF00 for ; Sun, 8 Nov 2020 03:14:14 +0000 (UTC) X-FDA: 77459782428.06.time54_3a0602c272e0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 6A1C11003B499 for ; Sun, 8 Nov 2020 03:14:14 +0000 (UTC) X-HE-Tag: time54_3a0602c272e0 X-Filterd-Recvd-Size: 5123 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Sun, 8 Nov 2020 03:14:13 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sat, 07 Nov 2020 19:14:15 -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; Sun, 8 Nov 2020 03:14:11 +0000 Subject: Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS To: "Song Bao Hua (Barry Song)" , Randy Dunlap , "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> From: John Hubbard Message-ID: Date: Sat, 7 Nov 2020 19:14:10 -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: <869059977c224a3aa31bfb42a4a8148d@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=1604805255; bh=FTByv3SGXWVVSQVivOCXu3gFrqD/yc6jT7uBxoTI9LY=; 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=ElQlL9ukGrzLDXnyprv/K8G2A1d/4zqB713ApLG0UR0sJVGWv1L1tLWsoLT7+jJd9 S/Kz+92IdJX0URgUQGWZWJMWnGO8dWmW0n0XYgJdj2qB5cr5pJx7aEZhYH9EqZBHBL frHL8y3plwdl9M0cQfbzTWga6r4TpE+kmzSO9Uk/OTBZpcj43tO4ihsuv0Wp1HpPvd jmVSzdwwGtgKoXpY05lnoYN4R9yEnGRXcuNkaAAGvo8vIKPo20Z09caFXAaEm09lAL z5CPJUDsGNlsOgw5Pi7Rh/MzWZ3EQGs8zfBUIfhw4aNYOB8Vg0B4gqo/SWZ20LKoO7 RIkzO1uHNSg0Q== 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 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 entirely, 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) experience: a) The user enables GUP_TEST, then boots up, runs, and is briefly surprised 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 debug 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 menu, although of course "you should already know about it"...but there's a lot to "already know" in a large kernel. From a user experience, it's way better to simply see what you want, and select it in the menu. Or, at least get some prompt that you need to pre-select something else. > The difference between "depends on" and "select" for this case is like: > depends on: if we want to use GUP_TEST, we have to enable DEBUG_FS first; > select: if we enable GUP_TEST, Kconfig will enable DEBUG_FS automatically. > > To me, I am 60% inclined to "depends on" as I think "DEBUG_FS" is more > of a pre-condition of GUP_TEST than an internal part of GUP_TEST. So people > should realize the pre-condition must be met before using GUP_TEST and Right, but first of course they must read every single line of the test code carefully. And while it is true the you often *do* end up reading most or all of the test code, there are situations in which you don't need to. We'd be taking away some of those situations. :) > they must manually enable it if they haven't. That's why I think this patch is > making things better. > ...which makes things a little bit worse. thanks, -- John Hubbard NVIDIA