Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2339100pxb; Sat, 7 Nov 2020 19:19:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAkQ81YX+PfOqkYbP7FR68DvxSb8LuN9Nts1v+3QUAehcbRbotKsBlNE1lekn9boi4wZ2m X-Received: by 2002:a50:d751:: with SMTP id i17mr9219779edj.337.1604805549405; Sat, 07 Nov 2020 19:19:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604805549; cv=none; d=google.com; s=arc-20160816; b=ul08SN3SbFpQNdff2vpFaQHt/5t9jP0rBj0/1KmxArOKb4Gkgbogo1sTkmg8VWInw1 11k6lAtk55H3dRq4We+zsuTpKbusSSsOm5oDXRY0wcWPzbZ6em5jHEyc9hb8as2BuOJA Vs/wf+5GYmqNVuZ+Gmv0COYnTTRi6BGHy2vCC3eK7M5Qap5W1m2LPv1j382HZG9Yypz3 gkeKqLRyl1V94jcHuW8VsUUvsvErE0QyLwplWOpUemcBUAo4JpxDHRDvHDp+ZhGL61Hk +OWPrcRcMwscdK+UTaO9XcNZfTf/tXe6WKrhc7eReBgAAH34pxA2qvzhqww6XkPp1FeH wwqg== 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=FTByv3SGXWVVSQVivOCXu3gFrqD/yc6jT7uBxoTI9LY=; b=vRqgAMASQbq1JQr+o2PeWKQ9EFaYs9m8TMv2XPB08XU7zknEzv1G2Jo+VR4G9WjsIa gcqC+sTq03FYXVZT+70xHTNlwlccbYPTQcQW6sV3EOwLzGWe/e9PyEjXpvxT6AorknZm J07dEdwqm7vfQmOkniQtUOz3GN+YfhuYOcJy2prSDW6/OubqI4IiLd53LCbCDqZq4zwd 6oVHZTWLlxx5nnagafX3Pxn0I4MTV6Sur1FQIwV3SMSSJMb2mMQf4vVcdsDygkcslLTM 1VOB0PXLAnGbGCjcbG5S7N0V5gourm1f0/VppOpegbXZZR7o7Byec+Rkm7KOqT4+qSB/ 35mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ElQlL9uk; 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 x37si4976516ede.385.2020.11.07.19.18.43; Sat, 07 Nov 2020 19:19:09 -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=ElQlL9uk; 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 S1728787AbgKHDOM (ORCPT + 99 others); Sat, 7 Nov 2020 22:14:12 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:5787 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728388AbgKHDOM (ORCPT ); Sat, 7 Nov 2020 22:14:12 -0500 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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