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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 688DAC35249 for ; Mon, 3 Feb 2020 21:35:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2B78520658 for ; Mon, 3 Feb 2020 21:35:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="lil64nru" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B78520658 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 41F156B0005; Mon, 3 Feb 2020 16:35:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3F49B6B0006; Mon, 3 Feb 2020 16:35:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 30C106B0007; Mon, 3 Feb 2020 16:35:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id 1537D6B0005 for ; Mon, 3 Feb 2020 16:35:03 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AE0C6180AD806 for ; Mon, 3 Feb 2020 21:35:02 +0000 (UTC) X-FDA: 76450121244.04.paper74_66022cc6fe12e X-HE-Tag: paper74_66022cc6fe12e X-Filterd-Recvd-Size: 4560 Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Mon, 3 Feb 2020 21:35:00 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 03 Feb 2020 13:34:44 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 03 Feb 2020 13:34:59 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 03 Feb 2020 13:34:59 -0800 Received: from [10.110.48.28] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 3 Feb 2020 21:34:58 +0000 Subject: Re: [PATCH v3 10/12] mm/gup: /proc/vmstat: pin_user_pages (FOLL_PIN) reporting To: "Kirill A. Shutemov" CC: Andrew Morton , Al Viro , Christoph Hellwig , Dan Williams , Dave Chinner , Ira Weiny , Jan Kara , Jason Gunthorpe , Jonathan Corbet , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Michal Hocko , Mike Kravetz , Shuah Khan , Vlastimil Babka , Matthew Wilcox , , , , , , LKML References: <20200201034029.4063170-1-jhubbard@nvidia.com> <20200201034029.4063170-11-jhubbard@nvidia.com> <20200203135320.edujsfjwt5nvtiit@box> <0425e1e6-f172-91df-2251-7583fcfed3e6@nvidia.com> <20200203213022.rltjlohvaswk32ln@box.shutemov.name> From: John Hubbard X-Nvconfidentiality: public Message-ID: <0a81878a-1f7f-daec-0833-d5b91d197ddf@nvidia.com> Date: Mon, 3 Feb 2020 13:34:57 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200203213022.rltjlohvaswk32ln@box.shutemov.name> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1580765684; bh=kGDtNYXBy0zFUD4iLnz+tUqVaKJvqr8r2bUfyaZ94Dw=; h=X-PGP-Universal:Subject:To:CC:References:From:X-Nvconfidentiality: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=lil64nrusY2x09d9REkLc9RTXIIE+yyHnKjfdLHxccFpRZiiYsQeNWUqRp3Ub1/4s bd/LkFmhyJnXuYsE2GWCKaZUdA5vRG1GCoy6hIpxIFShc9Jucge2PdCO5n8odGUBV5 OadbuemDOVCzRFeeb9c0o7Q9QNsn3O2sD4WBb0svV4CWVsKr+5k4EUzpLxlVkV+qWo fkSvdmSuXL2e2du7xqqB6MRTNYiEweYr1AaPqGJUl8Yl8f2Ekxsg429JjSTAVcmJGp GLRup3JAq6cMc2eIcAufmW8QQOWX7XNyyVztw3larEWoHW51cML0Qh1qdWCk0ZUG+n iMTXQTTIQDNYw== 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 2/3/20 1:30 PM, Kirill A. Shutemov wrote: > On Mon, Feb 03, 2020 at 01:04:04PM -0800, John Hubbard wrote: >> On 2/3/20 5:53 AM, Kirill A. Shutemov wrote: >>> On Fri, Jan 31, 2020 at 07:40:27PM -0800, John Hubbard wrote: >>>> diff --git a/mm/gup.c b/mm/gup.c >>>> index c10d0d051c5b..9fe61d15fc0e 100644 >>>> --- a/mm/gup.c >>>> +++ b/mm/gup.c >>>> @@ -29,6 +29,19 @@ struct follow_page_context { >>>> unsigned int page_mask; >>>> }; >>>> >>>> +#ifdef CONFIG_DEBUG_VM >>> >>> Why under CONFIG_DEBUG_VM? There's nothing about this in the cover letter. >>> >> >> Early on, gup_benchmark showed a really significant slowdown from using these >> counters. And I don't doubt that it's still the case. >> >> I'll re-measure and add a short summary and a few numbers to the patch commit >> description, and to the v4 cover letter. > > Looks like you'll show zeros for these counters if debug is off. It can be > confusing to the user. I think these counters should go away if you don't > count them. > OK, that's a good point. (And in fact, the counters==0 situation already led me astray briefly while debugging with Leon R, even. heh.) I'll remove them entirely for the !CONFIG_DEBUG_VM case. thanks, -- John Hubbard NVIDIA