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=ham 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 91BD1C2D0A3 for ; Sat, 7 Nov 2020 00:12:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E5A220715 for ; Sat, 7 Nov 2020 00:12:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="hLu0XYwq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728215AbgKGAMv (ORCPT ); Fri, 6 Nov 2020 19:12:51 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:1221 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727569AbgKGAMu (ORCPT ); Fri, 6 Nov 2020 19:12:50 -0500 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== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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