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=-3.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 B1C51C352A3 for ; Fri, 7 Feb 2020 13:18:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 751DA218AC for ; Fri, 7 Feb 2020 13:18:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="px3p3e5+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 751DA218AC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 10D956B000C; Fri, 7 Feb 2020 08:18:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E5656B000D; Fri, 7 Feb 2020 08:18:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F3CA16B000E; Fri, 7 Feb 2020 08:18:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id D96D46B000C for ; Fri, 7 Feb 2020 08:18:54 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 91EFB3D13 for ; Fri, 7 Feb 2020 13:18:54 +0000 (UTC) X-FDA: 76463386188.25.use75_4dac312cb5056 X-HE-Tag: use75_4dac312cb5056 X-Filterd-Recvd-Size: 4967 Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Fri, 7 Feb 2020 13:18:53 +0000 (UTC) Received: by mail-lf1-f68.google.com with SMTP id v201so1477969lfa.11 for ; Fri, 07 Feb 2020 05:18:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uTjOaImg+ksV7BdfhHPQ/FTPKTcFmsjOHyFGzGRJy2I=; b=px3p3e5+GsuY8I3lV6XSDycZ8agIVbKmPPwgLu3Lh8i8iQeajhpVMp4YENKqYEfWvR l7szyDwa/fIPpLw33kK69S5Pf6ihs+yEsGacbdzkz4PviNn2h37DeQCHeB+f9y/P9dlX 9SdncWbfYLBcpEzPV9AYMAXIr1i7rBt3+hltAJJR9dLGiuI7doNoTQ90XAKteTE1YZaP a387s5QH+qimgQKymmW0q31yZKfC7F/xrtJemao9N0ck6ye7buDsUfpVivFekLFmvpU1 jE51d1bi32F/J79szF6TeskC/TaCYG1Bq+VncIzgSLIpksUBxV5+49GAruiGknYNG36G Yd0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uTjOaImg+ksV7BdfhHPQ/FTPKTcFmsjOHyFGzGRJy2I=; b=qJb30Zt1OMNzEh9sBrceNdTgtI0GaZWcJdx3CtMtr/jhVehcdkHmh08Y1v8yG6i206 NzzFpnphKDDTpF7Y2eAQfQlH7p+9nBL6YujlNuRJLRdUCe9Gb+UVb06UWM0Ehll3yXJc Jaca0ld/ujH+UXBoa/WhKNJo4BPQPH83uYF28eA3dW0eKtfIK7VVA8hmti23kPxjNm1j 4xqwQvOL+poTjs52eURJ9UI3S9aReu8XAfsaZwdhGbbxarLCSwwoK5Oqenv7x3p2JG2S MU4QqjiSENo9JKJWORbtpBMifZvCP1osIZqtyN5r3JOJ1VjZRx1DiYj4GIOPEw294Lqt u3ug== X-Gm-Message-State: APjAAAWobftg6OVM35rhPKsACo0ExrusBkSEGpaBUY7PFCoey5budTLM bmi/6dyAxbpfd2AiHujLlq8BFQ== X-Google-Smtp-Source: APXvYqxjvYht2BAnt/sn52oyart+TOO9Z4BGc1YhTQrInCsed0Qr9BHzni7Ywm8GZcbncIGhJ4MD0g== X-Received: by 2002:ac2:47ec:: with SMTP id b12mr4552216lfp.162.1581081532420; Fri, 07 Feb 2020 05:18:52 -0800 (PST) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id 4sm1056760lfj.75.2020.02.07.05.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Feb 2020 05:18:51 -0800 (PST) Received: by box.localdomain (Postfix, from userid 1000) id 5174D100B12; Fri, 7 Feb 2020 16:19:08 +0300 (+03) Date: Fri, 7 Feb 2020 16:19:08 +0300 From: "Kirill A. Shutemov" To: John Hubbard Cc: Andrew Morton , Al Viro , Christoph Hellwig , Dan Williams , Dave Chinner , Ira Weiny , Jan Kara , Jason Gunthorpe , Jonathan Corbet , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Michal Hocko , Mike Kravetz , Shuah Khan , Vlastimil Babka , Matthew Wilcox , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH v5 10/12] mm/gup: /proc/vmstat: pin_user_pages (FOLL_PIN) reporting Message-ID: <20200207131908.hplpt3gvvek56zm7@box> References: <20200207033735.308000-1-jhubbard@nvidia.com> <20200207033735.308000-11-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200207033735.308000-11-jhubbard@nvidia.com> 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 Thu, Feb 06, 2020 at 07:37:33PM -0800, John Hubbard wrote: > Now that pages are "DMA-pinned" via pin_user_page*(), and unpinned via > unpin_user_pages*(), we need some visibility into whether all of this is > working correctly. > > Add two new fields to /proc/vmstat: > > nr_foll_pin_acquired > nr_foll_pin_released > > These are documented in Documentation/core-api/pin_user_pages.rst. > They represent the number of pages (since boot time) that have been > pinned ("nr_foll_pin_acquired") and unpinned ("nr_foll_pin_released"), > via pin_user_pages*() and unpin_user_pages*(). > > In the absence of long-running DMA or RDMA operations that hold pages > pinned, the above two fields will normally be equal to each other. > > Also: update Documentation/core-api/pin_user_pages.rst, to remove an > earlier (now confirmed untrue) claim about a performance problem with > /proc/vmstat. > > Also: updated Documentation/core-api/pin_user_pages.rst to rename the > new /proc/vmstat entries, to the names listed here. > > Signed-off-by: John Hubbard Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov