mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Illumos #3537
3537 want pool io kstats Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Eric Schrock <eric.schrock@delphix.com> Reviewed by: Sa?o Kiselkov <skiselkov.ml@gmail.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Brendan Gregg <brendan.gregg@joyent.com> Approved by: Gordon Ross <gwr@nexenta.com> References: http://www.illumos.org/issues/3537 illumos/illumos-gate@c3a6601 Ported by: Cyril Plisko <cyril.plisko@mountall.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Porting Notes: 1. The patch was restructured to take advantage of the existing spa statistics infrastructure. To accomplish this the kstat was moved in to spa->io_stats and the init/destroy code moved to spa_stats.c. 2. The I/O kstat was simply named <pool> which conflicted with the pool directory we had already created. Therefore it was renamed to <pool>/io 3. An update handler was added to allow the kstat to be zeroed.
This commit is contained in:
committed by
Brian Behlendorf
parent
a117a6d66e
commit
330847ff36
@@ -550,6 +550,7 @@ typedef struct spa_stats {
|
||||
spa_stats_history_t read_history;
|
||||
spa_stats_history_t txg_history;
|
||||
spa_stats_history_t tx_assign_histogram;
|
||||
spa_stats_history_t io_history;
|
||||
} spa_stats_t;
|
||||
|
||||
typedef enum txg_state {
|
||||
|
||||
@@ -344,10 +344,16 @@ extern void cv_broadcast(kcondvar_t *cv);
|
||||
/*
|
||||
* kstat creation, installation and deletion
|
||||
*/
|
||||
extern kstat_t *kstat_create(char *, int,
|
||||
char *, char *, uchar_t, ulong_t, uchar_t);
|
||||
extern kstat_t *kstat_create(const char *, int,
|
||||
const char *, const char *, uchar_t, ulong_t, uchar_t);
|
||||
extern void kstat_install(kstat_t *);
|
||||
extern void kstat_delete(kstat_t *);
|
||||
extern void kstat_waitq_enter(kstat_io_t *);
|
||||
extern void kstat_waitq_exit(kstat_io_t *);
|
||||
extern void kstat_runq_enter(kstat_io_t *);
|
||||
extern void kstat_runq_exit(kstat_io_t *);
|
||||
extern void kstat_waitq_to_runq(kstat_io_t *);
|
||||
extern void kstat_runq_back_to_waitq(kstat_io_t *);
|
||||
extern void kstat_set_raw_ops(kstat_t *ksp,
|
||||
int (*headers)(char *buf, size_t size),
|
||||
int (*data)(char *buf, size_t size, void *data),
|
||||
|
||||
Reference in New Issue
Block a user