Date: Fri, 21 Oct 2011 21:49:34 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r226620 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201110212149.p9LLnYTe042645@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Fri Oct 21 21:49:34 2011 New Revision: 226620 URL: http://svn.freebsd.org/changeset/base/226620 Log: 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 <marcus@blazingdot.com> Patch by: avg MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Oct 21 20:23:40 2011 (r226619) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Oct 21 21:49:34 2011 (r226620) @@ -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: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Oct 21 20:23:40 2011 (r226619) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Fri Oct 21 21:49:34 2011 (r226620) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110212149.p9LLnYTe042645>