Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2011 10:24:47 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r227702 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201111191024.pAJAOlOE038085@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Sat Nov 19 10:24:46 2011
New Revision: 227702
URL: http://svn.freebsd.org/changeset/base/227702

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 <marcus@blazingdot.com>
  Patch by:	avg
  Approved by:	re (kib)

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Sat Nov 19 10:11:50 2011	(r227701)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c	Sat Nov 19 10:24:46 2011	(r227702)
@@ -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: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Sat Nov 19 10:11:50 2011	(r227701)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Sat Nov 19 10:24:46 2011	(r227702)
@@ -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?201111191024.pAJAOlOE038085>