mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
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
This commit is contained in:
parent
19b5c7c246
commit
72b880fa83
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226620
@ -627,6 +627,10 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags)
|
||||
} 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);
|
||||
|
@ -397,9 +397,12 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user