2 * IO priority handling declarations and helper functions common to the
3 * libaio and io_uring engines.
11 /* read and writes only, no trim */
12 #define CMDPRIO_RWDIR_CNT 2
23 uint16_t clat_prio_index;
26 struct cmdprio_bsprio {
29 unsigned int nr_prios;
30 struct cmdprio_prio *prios;
33 struct cmdprio_bsprio_desc {
34 struct cmdprio_bsprio *bsprios;
35 unsigned int nr_bsprios;
38 struct cmdprio_options {
39 unsigned int percentage[CMDPRIO_RWDIR_CNT];
40 unsigned int class[CMDPRIO_RWDIR_CNT];
41 unsigned int level[CMDPRIO_RWDIR_CNT];
46 struct cmdprio_options *options;
47 struct cmdprio_prio perc_entry[CMDPRIO_RWDIR_CNT];
48 struct cmdprio_bsprio_desc bsprio_desc[CMDPRIO_RWDIR_CNT];
52 bool fio_cmdprio_set_ioprio(struct thread_data *td, struct cmdprio *cmdprio,
55 void fio_cmdprio_cleanup(struct cmdprio *cmdprio);
57 int fio_cmdprio_init(struct thread_data *td, struct cmdprio *cmdprio,
58 struct cmdprio_options *options);