Lines Matching refs:READ
332 INIT_LIST_HEAD(&sq->queued[READ]); in throtl_service_queue_init()
357 for (rw = READ; rw <= WRITE; rw++) { in throtl_pd_alloc()
363 tg->bps[READ][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
365 tg->iops[READ][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
367 tg->bps_conf[READ][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
369 tg->iops_conf[READ][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
424 for (rw = READ; rw <= WRITE; rw++) { in tg_update_has_rules()
457 if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] || in blk_throtl_update_limit_valid()
458 tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) { in blk_throtl_update_limit_valid()
478 tg->bps[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
480 tg->iops[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
653 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice_with_credit()
671 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice()
687 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_extend_slice()
756 rw == READ ? 'R' : 'W', nr_slices, bytes_trim, io_trim, in throtl_trim_slice()
813 if (tg->service_queue.nr_queued[READ]) in tg_update_carryover()
814 __tg_update_carryover(tg, READ); in tg_update_carryover()
820 tg->carryover_bytes[READ], tg->carryover_bytes[WRITE], in tg_update_carryover()
821 tg->carryover_ios[READ], tg->carryover_ios[WRITE]); in tg_update_carryover()
1021 bio = throtl_peek_queued(&sq->queued[READ]); in tg_update_disptime()
1104 while ((bio = throtl_peek_queued(&sq->queued[READ])) && in throtl_dispatch_tg()
1148 if (sq->nr_queued[READ] || sq->nr_queued[WRITE]) in throtl_select_dispatch()
1207 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1208 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1269 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1326 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1327 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1365 throtl_start_new_slice(tg, READ, false); in tg_conf_updated()
1449 .private = offsetof(struct throtl_grp, bps[READ][LIMIT_MAX]),
1461 .private = offsetof(struct throtl_grp, iops[READ][LIMIT_MAX]),
1516 if (tg->bps_conf[READ][off] == bps_dft && in tg_prfill_limit()
1518 tg->iops_conf[READ][off] == iops_dft && in tg_prfill_limit()
1525 if (tg->bps_conf[READ][off] != U64_MAX) in tg_prfill_limit()
1527 tg->bps_conf[READ][off]); in tg_prfill_limit()
1531 if (tg->iops_conf[READ][off] != UINT_MAX) in tg_prfill_limit()
1533 tg->iops_conf[READ][off]); in tg_prfill_limit()
1583 v[0] = tg->bps_conf[READ][index]; in tg_set_limit()
1585 v[2] = tg->iops_conf[READ][index]; in tg_set_limit()
1629 tg->bps_conf[READ][index] = v[0]; in tg_set_limit()
1631 tg->iops_conf[READ][index] = v[2]; in tg_set_limit()
1635 tg->bps[READ][index] = v[0]; in tg_set_limit()
1637 tg->iops[READ][index] = v[2]; in tg_set_limit()
1640 tg->bps[READ][LIMIT_LOW] = min(tg->bps_conf[READ][LIMIT_LOW], in tg_set_limit()
1641 tg->bps_conf[READ][LIMIT_MAX]); in tg_set_limit()
1644 tg->iops[READ][LIMIT_LOW] = min(tg->iops_conf[READ][LIMIT_LOW], in tg_set_limit()
1645 tg->iops_conf[READ][LIMIT_MAX]); in tg_set_limit()
1652 if (!(tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW] || in tg_set_limit()
1656 tg->bps[READ][LIMIT_LOW] = 0; in tg_set_limit()
1658 tg->iops[READ][LIMIT_LOW] = 0; in tg_set_limit()
1758 if (tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]) in __tg_last_low_overflow_time()
1759 rtime = tg->last_low_overflow_time[READ]; in __tg_last_low_overflow_time()
1782 if (!parent->bps[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1783 !parent->iops[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1828 read_limit = tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]; in throtl_tg_can_upgrade()
1832 if (read_limit && sq->nr_queued[READ] && in throtl_tg_can_upgrade()
1836 (!read_limit || sq->nr_queued[READ])) in throtl_tg_can_upgrade()
1997 if (tg->bps[READ][LIMIT_LOW]) { in throtl_downgrade_check()
1998 bps = tg->last_bytes_disp[READ] * HZ; in throtl_downgrade_check()
2000 if (bps >= tg->bps[READ][LIMIT_LOW]) in throtl_downgrade_check()
2001 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
2011 if (tg->iops[READ][LIMIT_LOW]) { in throtl_downgrade_check()
2012 iops = tg->last_io_disp[READ] * HZ / elapsed_time; in throtl_downgrade_check()
2013 if (iops >= tg->iops[READ][LIMIT_LOW]) in throtl_downgrade_check()
2014 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
2030 tg->last_bytes_disp[READ] = 0; in throtl_downgrade_check()
2032 tg->last_io_disp[READ] = 0; in throtl_downgrade_check()
2067 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2098 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2124 td->avg_buckets[READ][i].latency, in throtl_update_latency_buckets()
2125 td->avg_buckets[READ][i].valid, in throtl_update_latency_buckets()
2236 rw == READ ? 'R' : 'W', in __blk_throtl_bio()
2240 sq->nr_queued[READ], sq->nr_queued[WRITE]); in __blk_throtl_bio()
2364 td->latency_buckets[READ] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2366 if (!td->latency_buckets[READ]) { in blk_throtl_init()
2373 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2392 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2407 free_percpu(q->td->latency_buckets[READ]); in blk_throtl_exit()
2428 td->avg_buckets[READ][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register()