mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Remove pool io kstats
This mostly reverts "3537 want pool io kstats" commit of 8 years ago. From one side this code using pool-wide locks became pretty bad for performance, creating significant lock contention in I/O pipeline. From another, there are more efficient ways now to obtain detailed statistics, while this statistics is illumos-specific and much less usable on Linux and FreeBSD, reported only via procfs/sysctls. This commit does not remove KSTAT_TYPE_IO implementation, that may be removed later together with already unused KSTAT_TYPE_INTR and KSTAT_TYPE_TIMER. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored-By: iXsystems, Inc. Closes #12212
This commit is contained in:
committed by
Brian Behlendorf
parent
2e158b0e0b
commit
efdfb14fc8
@@ -50,72 +50,6 @@ kstat_resize_raw(kstat_t *ksp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
kstat_waitq_enter(kstat_io_t *kiop)
|
||||
{
|
||||
hrtime_t new, delta;
|
||||
ulong_t wcnt;
|
||||
|
||||
new = gethrtime();
|
||||
delta = new - kiop->wlastupdate;
|
||||
kiop->wlastupdate = new;
|
||||
wcnt = kiop->wcnt++;
|
||||
if (wcnt != 0) {
|
||||
kiop->wlentime += delta * wcnt;
|
||||
kiop->wtime += delta;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(kstat_waitq_enter);
|
||||
|
||||
void
|
||||
kstat_waitq_exit(kstat_io_t *kiop)
|
||||
{
|
||||
hrtime_t new, delta;
|
||||
ulong_t wcnt;
|
||||
|
||||
new = gethrtime();
|
||||
delta = new - kiop->wlastupdate;
|
||||
kiop->wlastupdate = new;
|
||||
wcnt = kiop->wcnt--;
|
||||
ASSERT((int)wcnt > 0);
|
||||
kiop->wlentime += delta * wcnt;
|
||||
kiop->wtime += delta;
|
||||
}
|
||||
EXPORT_SYMBOL(kstat_waitq_exit);
|
||||
|
||||
void
|
||||
kstat_runq_enter(kstat_io_t *kiop)
|
||||
{
|
||||
hrtime_t new, delta;
|
||||
ulong_t rcnt;
|
||||
|
||||
new = gethrtime();
|
||||
delta = new - kiop->rlastupdate;
|
||||
kiop->rlastupdate = new;
|
||||
rcnt = kiop->rcnt++;
|
||||
if (rcnt != 0) {
|
||||
kiop->rlentime += delta * rcnt;
|
||||
kiop->rtime += delta;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(kstat_runq_enter);
|
||||
|
||||
void
|
||||
kstat_runq_exit(kstat_io_t *kiop)
|
||||
{
|
||||
hrtime_t new, delta;
|
||||
ulong_t rcnt;
|
||||
|
||||
new = gethrtime();
|
||||
delta = new - kiop->rlastupdate;
|
||||
kiop->rlastupdate = new;
|
||||
rcnt = kiop->rcnt--;
|
||||
ASSERT((int)rcnt > 0);
|
||||
kiop->rlentime += delta * rcnt;
|
||||
kiop->rtime += delta;
|
||||
}
|
||||
EXPORT_SYMBOL(kstat_runq_exit);
|
||||
|
||||
static int
|
||||
kstat_seq_show_headers(struct seq_file *f)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user