From owner-svn-src-all@FreeBSD.ORG Wed Aug 29 15:28:39 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30754106574F; Wed, 29 Aug 2012 15:28:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 184F28FC19; Wed, 29 Aug 2012 15:28:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7TFSc9e068200; Wed, 29 Aug 2012 15:28:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7TFScrj068198; Wed, 29 Aug 2012 15:28:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201208291528.q7TFScrj068198@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 29 Aug 2012 15:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239838 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2012 15:28:39 -0000 Author: kib Date: Wed Aug 29 15:28:38 2012 New Revision: 239838 URL: http://svn.freebsd.org/changeset/base/239838 Log: MFC r236516: Count and export the number of prefaulting happen. Modified: stable/9/sys/kern/vfs_vnops.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_vnops.c ============================================================================== --- stable/9/sys/kern/vfs_vnops.c Wed Aug 29 15:21:27 2012 (r239837) +++ stable/9/sys/kern/vfs_vnops.c Wed Aug 29 15:28:38 2012 (r239838) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -766,6 +767,9 @@ unlock: } static const int io_hold_cnt = 16; +static unsigned long vn_io_faults_cnt; +SYSCTL_LONG(_debug, OID_AUTO, vn_io_faults, CTLFLAG_RD, + &vn_io_faults_cnt, 0, "Count of vn_io_fault lock avoidance triggers"); /* * The vn_io_fault() is a wrapper around vn_read() and vn_write() to @@ -863,6 +867,7 @@ vn_io_fault(struct file *fp, struct uio if (error != EFAULT) goto out; + atomic_add_long(&vn_io_faults_cnt, 1); uio_clone->uio_segflg = UIO_NOCOPY; uiomove(NULL, resid - uio->uio_resid, uio_clone); uio_clone->uio_segflg = uio->uio_segflg;