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.8 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 DF8CAC352A3 for ; Wed, 5 Feb 2020 11:43:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B6D5821741 for ; Wed, 5 Feb 2020 11:43:15 +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="xqc4RuXX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727843AbgBELnP (ORCPT ); Wed, 5 Feb 2020 06:43:15 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:44289 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727070AbgBELnO (ORCPT ); Wed, 5 Feb 2020 06:43:14 -0500 Received: by mail-lf1-f66.google.com with SMTP id v201so1232846lfa.11 for ; Wed, 05 Feb 2020 03:43:12 -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=Rg7FTb2EgzwOWtOl0Xh6SbFh/TDgIq/m4oej/j7EPsc=; b=xqc4RuXXK6fPykrtEKs2WWshltrhXJ8pi3DtiLilCDNoCowiBWIO11F8QV2xYxhR8b T3vNBwC3lWRaITvvrEEqmM0SMQWJPa3dJbYhI51XEx8oF0CkrITqDVx8yRD0aTffPJDn sdmmfHSWVSqPoliUVDy85GbYfW6ruojAgBfVZxXigpn3TqbLBDdRhyS8A1HALKtjt7fQ sLqgWUx13HP8PvkDbWENV1Q7qLdBeHXkHTTFMm1c3IJcKkbYcDPWZ7K6No8QskYqARcS h42YxDkYmUL75rirEZLc3ay0c2OKP0hW8yKGroN5vGefezStmjyzjwY5hJRbwIuMdmnn RvWw== 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=Rg7FTb2EgzwOWtOl0Xh6SbFh/TDgIq/m4oej/j7EPsc=; b=THFygFjSVThQV62q64mdQNett3U6N0o/E748IVhW7lNahTQdSkG7W1o8gGSn1qbYIe L40RX89AI+Ra9CZlFREsJTp9wTeVCHy4WHVhh3yz88A8CSpbcTqRAolL/oiq9AEjTa9T ul1q1aYZ39EeAvKuG+nW8iUq99DUpyrjtUrFHZQzULAZ0O4JEg9RknnQ6IVV0NxI2XRA kvyqBrnKVSL9Nw0HOnVjsrOdhb6i5e318HFvB8pub6rtGIFfqoK+h3yuA4lUTHaPkSyH 8mg194A7YADBdi1n2kFE8m3QgeveeeDG/j1NqokEKg+F5tzVnFWWURwoqM1nSg8rEqOx Rypg== X-Gm-Message-State: APjAAAVHrT9GLNacvKLhljsG3S/WNo6WJ3b4fPVPGde3UBIZZlKklK8e wukzKjS5kyLOG7de4EtbzD6dWA== X-Google-Smtp-Source: APXvYqyGuiOfyYh+qTRTsP2YJUspzVgxdBbwwERcM0hZgAzWTzfcx473yxjEYxYiSHWiqrCV91FjRA== X-Received: by 2002:a19:5201:: with SMTP id m1mr17618504lfb.114.1580902991825; Wed, 05 Feb 2020 03:43:11 -0800 (PST) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id u23sm12011076lfg.89.2020.02.05.03.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 03:43:11 -0800 (PST) Received: by box.localdomain (Postfix, from userid 1000) id 42BA0100AF6; Wed, 5 Feb 2020 14:43:25 +0300 (+03) Date: Wed, 5 Feb 2020 14:43:25 +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 v4 10/12] mm/gup: /proc/vmstat: pin_user_pages (FOLL_PIN) reporting Message-ID: <20200205114325.4e2f5aghsusihpap@box> References: <20200204234117.2974687-1-jhubbard@nvidia.com> <20200204234117.2974687-11-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200204234117.2974687-11-jhubbard@nvidia.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 04, 2020 at 03:41:15PM -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 Please, clarify semantics for huge page. An user may want to know if we count huge page as one pin-acquired or by number of pages. Otherwise looks good (given Jan concern is addressed). -- Kirill A. Shutemov