Lines Matching refs:blkiolat
143 struct blk_iolatency *blkiolat; member
329 static void scale_cookie_change(struct blk_iolatency *blkiolat, in scale_cookie_change() argument
333 unsigned long qd = blkiolat->rqos.disk->queue->nr_requests; in scale_cookie_change()
375 unsigned long qd = iolat->blkiolat->rqos.disk->queue->nr_requests; in scale_change()
465 struct blk_iolatency *blkiolat = BLKIOLATENCY(rqos); in blkcg_iolatency_throttle() local
469 if (!blkiolat->enabled) in blkcg_iolatency_throttle()
484 if (!timer_pending(&blkiolat->timer)) in blkcg_iolatency_throttle()
485 mod_timer(&blkiolat->timer, jiffies + HZ); in blkcg_iolatency_throttle()
574 scale_cookie_change(iolat->blkiolat, lat_info, true); in iolatency_check_latencies()
584 scale_cookie_change(iolat->blkiolat, lat_info, false); in iolatency_check_latencies()
609 if (!iolat->blkiolat->enabled) in blkcg_iolatency_done_bio()
645 struct blk_iolatency *blkiolat = BLKIOLATENCY(rqos); in blkcg_iolatency_exit() local
647 timer_shutdown_sync(&blkiolat->timer); in blkcg_iolatency_exit()
648 flush_work(&blkiolat->enable_work); in blkcg_iolatency_exit()
650 kfree(blkiolat); in blkcg_iolatency_exit()
661 struct blk_iolatency *blkiolat = from_timer(blkiolat, t, timer); in blkiolatency_timer_fn() local
668 blkiolat->rqos.disk->queue->root_blkg) { in blkiolatency_timer_fn()
700 scale_cookie_change(iolat->blkiolat, lat_info, true); in blkiolatency_timer_fn()
737 struct blk_iolatency *blkiolat = container_of(work, struct blk_iolatency, in blkiolatency_enable_work_fn() local
750 enabled = atomic_read(&blkiolat->enable_cnt); in blkiolatency_enable_work_fn()
751 if (enabled != blkiolat->enabled) { in blkiolatency_enable_work_fn()
752 blk_mq_freeze_queue(blkiolat->rqos.disk->queue); in blkiolatency_enable_work_fn()
753 blkiolat->enabled = enabled; in blkiolatency_enable_work_fn()
754 blk_mq_unfreeze_queue(blkiolat->rqos.disk->queue); in blkiolatency_enable_work_fn()
760 struct blk_iolatency *blkiolat; in blk_iolatency_init() local
763 blkiolat = kzalloc(sizeof(*blkiolat), GFP_KERNEL); in blk_iolatency_init()
764 if (!blkiolat) in blk_iolatency_init()
767 ret = rq_qos_add(&blkiolat->rqos, disk, RQ_QOS_LATENCY, in blk_iolatency_init()
775 timer_setup(&blkiolat->timer, blkiolatency_timer_fn, 0); in blk_iolatency_init()
776 INIT_WORK(&blkiolat->enable_work, blkiolatency_enable_work_fn); in blk_iolatency_init()
781 rq_qos_del(&blkiolat->rqos); in blk_iolatency_init()
783 kfree(blkiolat); in blk_iolatency_init()
790 struct blk_iolatency *blkiolat = iolat->blkiolat; in iolatency_set_min_lat_nsec() local
799 if (atomic_inc_return(&blkiolat->enable_cnt) == 1) in iolatency_set_min_lat_nsec()
800 schedule_work(&blkiolat->enable_work); in iolatency_set_min_lat_nsec()
804 if (atomic_dec_return(&blkiolat->enable_cnt) == 0) in iolatency_set_min_lat_nsec()
805 schedule_work(&blkiolat->enable_work); in iolatency_set_min_lat_nsec()
987 struct blk_iolatency *blkiolat = BLKIOLATENCY(rqos); in iolatency_pd_init() local
1006 iolat->blkiolat = blkiolat; in iolatency_pd_init()