5 * Disk utils as read in /sys/block/<dev>/stat
7 struct disk_util_stat {
10 unsigned long long sectors[2];
13 unsigned time_in_queue;
17 * Per-device disk util management
20 struct flist_head list;
21 /* If this disk is a slave, hook it into the master's
22 * list using this head.
24 struct flist_head slavelist;
31 struct disk_util_stat dus;
32 struct disk_util_stat last_dus;
34 /* For software raids, this entry maintains pointers to the
35 * entries for the slave devices. The disk_util entries for
36 * the slaves devices should primarily be maintained through
37 * the disk_list list, i.e. for memory allocation and
38 * de-allocation, etc. Whereas this list should be used only
39 * for aggregating a software RAID's disk util figures.
41 struct flist_head slaves;
46 struct fio_mutex *lock;
50 static inline void disk_util_inc(struct disk_util *du)
53 fio_mutex_down(du->lock);
55 fio_mutex_up(du->lock);
59 static inline void disk_util_dec(struct disk_util *du)
62 fio_mutex_down(du->lock);
64 fio_mutex_up(du->lock);
68 #define DISK_UTIL_MSEC (250)
73 #ifdef FIO_HAVE_DISK_UTIL
74 extern void show_disk_util(void);
75 extern void init_disk_util(struct thread_data *);
76 extern void update_io_ticks(void);
78 #define show_disk_util()
79 #define init_disk_util(td)
80 #define update_io_ticks()