From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 2 14:22:56 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25E981065739 for ; Thu, 2 Aug 2012 14:22:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 7E53E8FC1C for ; Thu, 2 Aug 2012 14:22:55 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q72EN0CT082620; Thu, 2 Aug 2012 17:23:00 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q72EMmbW083097; Thu, 2 Aug 2012 17:22:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q72EMmX4083096; Thu, 2 Aug 2012 17:22:48 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 2 Aug 2012 17:22:48 +0300 From: Konstantin Belousov To: Andrey Zonov Message-ID: <20120802142248.GY2676@deviant.kiev.zoral.com.ua> References: <501A85A1.3050106@zonov.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v/49yhf2B++JedBI" Content-Disposition: inline In-Reply-To: <501A85A1.3050106@zonov.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: system wide major/minor page faults counters X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 14:22:56 -0000 --v/49yhf2B++JedBI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 02, 2012 at 05:50:25PM +0400, Andrey Zonov wrote: > Hi, >=20 > It would be useful to have system wide major and minor page faults=20 > counters. Attached patch makes this possible. >=20 > Are there any objections to have it? I thought that struct vmmeter was engraved into our ABI much deeper, but inspection shows that at least base system successfully avoids dragging the structure into ABI at all. So what follows is only some comments and not objections. The description of v_majflt as 'page faults' and v_minflt as 'page reclaim' is very confusing, IMO. First, the v_majflt is not inclusive in regard of v_minflt. Second, reclaim usually has a connotation of thing being repurposed (I am probably wrong there), which is not case for minor page faults. As an additional twist, please note that not all page faults reach vm_fault_hold() at all. See for instance x86 handling of the spurious page faults, I believe that other architectures like MIPS also completely consume some page faults in MD code. The minfault counter probably should be incremented there too. And, not all calls to vm_fault_hold() are caused by hardware page faults. See the use of vm_fault_hold() and vm_fault_quick_hold_pages() scattered around the sys/. --v/49yhf2B++JedBI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlAajTgACgkQC3+MBN1Mb4iq0QCfZWYDDEbz/exhrtcNLV2GenOu F2wAnA4WRg+h03J1D7vQCF8CZjuBhcNs =mT/I -----END PGP SIGNATURE----- --v/49yhf2B++JedBI--