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=-11.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 30794C4741F for ; Sat, 7 Nov 2020 00:12:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 75ECD2087E for ; Sat, 7 Nov 2020 00:12:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="hLu0XYwq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 75ECD2087E 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 78C226B0036; Fri, 6 Nov 2020 19:12:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 73DFF6B005C; Fri, 6 Nov 2020 19:12:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 652AE6B0068; Fri, 6 Nov 2020 19:12:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 34C6A6B0036 for ; Fri, 6 Nov 2020 19:12:54 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 018B3824999B for ; Sat, 7 Nov 2020 00:12:53 +0000 (UTC) X-FDA: 77455696626.24.brake41_14005d2272d6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id D61191A4A0 for ; Sat, 7 Nov 2020 00:12:52 +0000 (UTC) X-HE-Tag: brake41_14005d2272d6 X-Filterd-Recvd-Size: 3762 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Sat, 7 Nov 2020 00:12:52 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Fri, 06 Nov 2020 16:12:48 -0800 Received: from [10.2.49.167] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 7 Nov 2020 00:12:49 +0000 Subject: Re: [PATCH] mm/gup_benchmark: GUP_BENCHMARK depends on DEBUG_FS To: Barry Song , , , CC: , Ralph Campbell , John Garry References: <20201104100552.20156-1-song.bao.hua@hisilicon.com> From: John Hubbard Message-ID: Date: Fri, 6 Nov 2020 16:12:49 -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: <20201104100552.20156-1-song.bao.hua@hisilicon.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1604707968; bh=uICF5ObOMOjytBPfkDS/1DO5kpUvXA8svTRrvMMdFPY=; 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=hLu0XYwqfqnbxZH6oa6TXqnUa5lw25VnW4Vsr1wf9tTfdbMkkhem/Kkie1rNRYcrv lI9rNLW17p0AtujAm0xhxIi5iXCWVLrDhu5OmO+fAdPwpexvo4dDb/ilG1N1GYLO8e EyuQyZEapjHx3YgnN9nyoyGPustKmycXD+c5wKczVQUxZB0qyVJxN3Xqp7VoaxAX7f JEoALhSBZVx1wSrQ1ds5PAOUjAwWGbQ4kir7C5f2+OxMqwrYHgNcS9LGLF3L9nt2hn CZO8gMHdJEkOorlF2HOZkGh06c2y79RLWUZHoEewONcvfD00uZzPIm5q4FjJXcvizI mjK26qab7m3OA== 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/4/20 2:05 AM, Barry Song wrote: > Without DEBUG_FS, all the code in gup_benchmark becomes meaningless. > For sure kernel provides debugfs stub while DEBUG_FS is disabled, but > the point here is that GUP_BENCHMARK can do nothing without DEBUG_FS. > > Cc: John Hubbard > Cc: Ralph Campbell > Inspired-by: John Garry > Signed-off-by: Barry Song > --- > * inspired by John's comment in this patch: > https://lore.kernel.org/linux-iommu/184797b8-512e-e3da-fae7-25c7d662648b@huawei.com/ > > mm/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/Kconfig b/mm/Kconfig > index d42423f..91fa923 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -836,6 +836,7 @@ config PERCPU_STATS > > 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". So depends on really on is better for things that you just can't control, such as the cpu arch you're on, etc. Also note that this will have some minor merge conflict with mmotm, Due to renaming to GUP_TEST. No big deal though. thanks, -- John Hubbard NVIDIA