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=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 42D04C3524F for ; Mon, 3 Feb 2020 23:16:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D654020838 for ; Mon, 3 Feb 2020 23:16:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="bvGYZeEZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D654020838 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 5CCFE6B0006; Mon, 3 Feb 2020 18:16:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 57D416B0007; Mon, 3 Feb 2020 18:16:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 492C76B0008; Mon, 3 Feb 2020 18:16:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0229.hostedemail.com [216.40.44.229]) by kanga.kvack.org (Postfix) with ESMTP id 327EA6B0006 for ; Mon, 3 Feb 2020 18:16:55 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DAD232472 for ; Mon, 3 Feb 2020 23:16:54 +0000 (UTC) X-FDA: 76450377948.08.cough43_767b7f594524d X-HE-Tag: cough43_767b7f594524d X-Filterd-Recvd-Size: 5102 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf15.hostedemail.com (Postfix) with ESMTP for ; Mon, 3 Feb 2020 23:16:53 +0000 (UTC) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 03 Feb 2020 15:15:56 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 03 Feb 2020 15:16:52 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 03 Feb 2020 15:16:52 -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 23:16:52 +0000 Subject: Re: [PATCH v3 10/12] mm/gup: /proc/vmstat: pin_user_pages (FOLL_PIN) reporting From: John Hubbard 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> <0a81878a-1f7f-daec-0833-d5b91d197ddf@nvidia.com> X-Nvconfidentiality: public Message-ID: Date: Mon, 3 Feb 2020 15:16:51 -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: <0a81878a-1f7f-daec-0833-d5b91d197ddf@nvidia.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) 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=1580771756; bh=gvY+g+j4Cj7DxqzAg/mvEPWkOwg/CtLtNejZlwoZKR0=; h=X-PGP-Universal:Subject:From:To:CC:References: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=bvGYZeEZhdzmUm7/dYb8FIKdGpgeZzC3J0CrzLhhHGHjYXMti9hHN9MSqVzHFcNo0 oNMt21uHiUzvprhIl/oMCokx6Bbcmizhamb59Yb6eSD8v4BqKb/x0DEXedh45mcmhN hGr850FTLsQiwe3uEaxwRtsJ1WVB3xWH1EEgMpDLQuZheUBgU/jZxNtRAM1oTcHFV6 om2FUKOUPW2PMVRq9cYZUwhHTtlezrfRAzh+rXyVycb+FA00v6cYHjU2y9iFdSSWOb VgzH+jvJzuWzEmJfzcVK8YTKu5LLf4ZhsaIwz8fQvZgCZ8G0ftJVPMd+dd8BCjyMz8 CBGwBZbi5Qp0g== 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:34 PM, John Hubbard wrote: > 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. > On second thought, let me do some more careful performance testing. I don't recall now if I was just removing every possible perf slowdown item, when I made this decision. It could be that the perf is not affected, and I could just leave this feature enabled at all times, which would be nicer. And after all, these counters were designed for pretty hot-path items. I'll report back with results... thanks, -- John Hubbard NVIDIA