Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp182343ybv; Wed, 5 Feb 2020 03:44:37 -0800 (PST) X-Google-Smtp-Source: APXvYqylsaJQXb7rw+7VumAO8yDoMCPDRAML+AttVtLnWC4w2pBJIC9G1fOJqaJcpYtEkCqNigwR X-Received: by 2002:aca:cf12:: with SMTP id f18mr2528892oig.81.1580903077091; Wed, 05 Feb 2020 03:44:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580903077; cv=none; d=google.com; s=arc-20160816; b=0UU6ItC+4FlSLR4YjpUTy+iuvf9a1g13p8tTcaNW0LbX2jIakRflyKlPsD4JYv4Vk1 vTAuCkH+ZH98MDRV7cNGhg+2V90A4hVagIgWJc/m/gFuh10EQ6osDnZ6k/6jYNZjp/CB OeVMxalhBe3I0XXB9LXlwMgLy5Iq97Vl2AXQ5nodIu4EMGZfnARj9lbOyKXrJP3sb9A5 e2KQJOYnXngF9JZg7f+k8Peq0EeC8Ovf7E8omMNWtVmdZVQYeivyVuyak252b8/AFT7L rNpoYD5pUF7aqAL/3I5KOGF06ZY1rUxh+NXSc18VDKP+32D6FiO3HPs6TrpBnt8aQyjd cOVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Rg7FTb2EgzwOWtOl0Xh6SbFh/TDgIq/m4oej/j7EPsc=; b=wjdp6pxwihxheRmRuQd+T45R+sHUTwiWkxs9rqpt85V6fRYsu4FWPW3DiVJfX+NAKL V6pXaRDYlu3Xnbn/TEogCU/zYPtp4EuARRLUCSab5bVkowjdeipAx2QPcQ1M4Xw4QiLf ecO60NGHuXbzhjMtY4fFjSbx9N5NIy0pkiDpYWOe+zGkJi1I+EFzZPw6XEx4RCbSwKB2 mDr2r9Sr4rXSw6S3hXiZ5cALEH9nwMtBYxuHb7sK0Tj3fz3z2wwjcapxjedJm3Tr2WMv KQWJj1lMd4vJ7f5Jpi16mzNx++YUiyCC+uyPvO6nr/Xz3B+efOurn9Nms22ntlKBuygv BnrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=xqc4RuXX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m17si15111818otk.109.2020.02.05.03.44.25; Wed, 05 Feb 2020 03:44:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=xqc4RuXX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727771AbgBELnP (ORCPT + 99 others); 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-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