From owner-svn-src-all@FreeBSD.ORG Sat Nov 19 11:42:20 2011 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 01798106564A; Sat, 19 Nov 2011 11:42:20 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB0708FC08; Sat, 19 Nov 2011 11:42:19 +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 pAJBgJD6040742; Sat, 19 Nov 2011 11:42:19 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAJBgJfk040739; Sat, 19 Nov 2011 11:42:19 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201111191142.pAJBgJfk040739@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 19 Nov 2011 11:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227707 - releng/9.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Sat, 19 Nov 2011 11:42:20 -0000 Author: pjd Date: Sat Nov 19 11:42:19 2011 New Revision: 227707 URL: http://svn.freebsd.org/changeset/base/227707 Log: MFC r226620: Update per-thread I/O statistics collection in ZFS. This allows to see processes I/O activity in 'top -m io' output. PR kern/156218 Reported by: Marcus Reid Patch by: avg Approved by: re (kib) Modified: releng/9.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c releng/9.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Directory Properties: releng/9.0/sys/ (props changed) releng/9.0/sys/amd64/include/xen/ (props changed) releng/9.0/sys/boot/ (props changed) releng/9.0/sys/boot/i386/efi/ (props changed) releng/9.0/sys/boot/ia64/efi/ (props changed) releng/9.0/sys/boot/ia64/ski/ (props changed) releng/9.0/sys/boot/powerpc/boot1.chrp/ (props changed) releng/9.0/sys/boot/powerpc/ofw/ (props changed) releng/9.0/sys/cddl/contrib/opensolaris/ (props changed) releng/9.0/sys/conf/ (props changed) releng/9.0/sys/contrib/dev/acpica/ (props changed) releng/9.0/sys/contrib/octeon-sdk/ (props changed) releng/9.0/sys/contrib/pf/ (props changed) releng/9.0/sys/contrib/x86emu/ (props changed) Modified: releng/9.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- releng/9.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Nov 19 11:17:27 2011 (r227706) +++ releng/9.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Nov 19 11:42:19 2011 (r227707) @@ -627,6 +627,10 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio } else if (db->db_state == DB_UNCACHED) { spa_t *spa = dn->dn_objset->os_spa; +#ifdef _KERNEL + curthread->td_ru.ru_inblock++; +#endif + if (zio == NULL) zio = zio_root(spa, NULL, NULL, ZIO_FLAG_CANFAIL); dbuf_read_impl(db, zio, &flags); Modified: releng/9.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- releng/9.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sat Nov 19 11:17:27 2011 (r227706) +++ releng/9.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sat Nov 19 11:42:19 2011 (r227707) @@ -397,9 +397,12 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, return (EIO); } /* initiate async i/o */ - if (read) { + if (read) (void) dbuf_read(db, zio, dbuf_flags); - } +#ifdef _KERNEL + else + curthread->td_ru.ru_oublock++; +#endif dbp[i] = &db->db; } rw_exit(&dn->dn_struct_rwlock);