From owner-svn-src-stable-11@freebsd.org Sun Mar 25 01:34:45 2018 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04603F60EB6; Sun, 25 Mar 2018 01:34:45 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF17A6B3B6; Sun, 25 Mar 2018 01:34:44 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A982B175B3; Sun, 25 Mar 2018 01:34:44 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2P1YivB001347; Sun, 25 Mar 2018 01:34:44 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2P1Yi6V001346; Sun, 25 Mar 2018 01:34:44 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201803250134.w2P1Yi6V001346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sun, 25 Mar 2018 01:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331518 - stable/11/lib/libutil X-SVN-Group: stable-11 X-SVN-Commit-Author: sevan X-SVN-Commit-Paths: stable/11/lib/libutil X-SVN-Commit-Revision: 331518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Mar 2018 01:34:45 -0000 Author: sevan (doc committer) Date: Sun Mar 25 01:34:44 2018 New Revision: 331518 URL: https://svnweb.freebsd.org/changeset/base/331518 Log: MFC r322665 Add caveat to kinfo_getvmmap(3) explaining high CPU utilisation. Based on kib's reply on https://lists.freebsd.org/pipermail/freebsd-hackers/2016-July/049710.html Modified: stable/11/lib/libutil/kinfo_getvmmap.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libutil/kinfo_getvmmap.3 ============================================================================== --- stable/11/lib/libutil/kinfo_getvmmap.3 Sun Mar 25 01:33:51 2018 (r331517) +++ stable/11/lib/libutil/kinfo_getvmmap.3 Sun Mar 25 01:34:44 2018 (r331518) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2015 +.Dd August 18, 2017 .Dt KINFO_GETVMMAP 3 .Os .Sh NAME @@ -58,6 +58,13 @@ with the mib. While the kernel returns a packed structure, this function expands the data into a fixed record format. +.Sh CAVEAT +.Fn kinfo_getvmmap +calls can cause significant CPU consumption because calculating the residency +counts requires iterating over all memory pages of the process. +Setting the sysctl variable +.Va kern.proc_vmmap_skip_resident_count +to 1 prevents this calculation. .Sh RETURN VALUES On success the .Fn kinfo_getvmmap