Lines Matching refs:READ
494 for (rw = READ; rw <= WRITE; rw++) { in throtl_pd_alloc()
500 tg->bps[READ][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
502 tg->iops[READ][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
504 tg->bps_conf[READ][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
506 tg->iops_conf[READ][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
555 for (rw = READ; rw <= WRITE; rw++) in tg_update_has_rules()
582 if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] || in blk_throtl_update_limit_valid()
583 tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) { in blk_throtl_update_limit_valid()
598 tg->bps[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
600 tg->iops[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
777 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice_with_credit()
789 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice()
805 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_extend_slice()
874 rw == READ ? 'R' : 'W', nr_slices, bytes_trim, io_trim, in throtl_trim_slice()
1084 bio = throtl_peek_queued(&sq->queued[READ]); in tg_update_disptime()
1166 while ((bio = throtl_peek_queued(&sq->queued[READ])) && in throtl_dispatch_tg()
1255 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1256 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1317 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1374 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1375 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1470 .private = offsetof(struct throtl_grp, bps[READ][LIMIT_MAX]),
1482 .private = offsetof(struct throtl_grp, iops[READ][LIMIT_MAX]),
1537 if (tg->bps_conf[READ][off] == bps_dft && in tg_prfill_limit()
1539 tg->iops_conf[READ][off] == iops_dft && in tg_prfill_limit()
1546 if (tg->bps_conf[READ][off] != U64_MAX) in tg_prfill_limit()
1548 tg->bps_conf[READ][off]); in tg_prfill_limit()
1552 if (tg->iops_conf[READ][off] != UINT_MAX) in tg_prfill_limit()
1554 tg->iops_conf[READ][off]); in tg_prfill_limit()
1603 v[0] = tg->bps_conf[READ][index]; in tg_set_limit()
1605 v[2] = tg->iops_conf[READ][index]; in tg_set_limit()
1649 tg->bps_conf[READ][index] = v[0]; in tg_set_limit()
1651 tg->iops_conf[READ][index] = v[2]; in tg_set_limit()
1655 tg->bps[READ][index] = v[0]; in tg_set_limit()
1657 tg->iops[READ][index] = v[2]; in tg_set_limit()
1660 tg->bps[READ][LIMIT_LOW] = min(tg->bps_conf[READ][LIMIT_LOW], in tg_set_limit()
1661 tg->bps_conf[READ][LIMIT_MAX]); in tg_set_limit()
1664 tg->iops[READ][LIMIT_LOW] = min(tg->iops_conf[READ][LIMIT_LOW], in tg_set_limit()
1665 tg->iops_conf[READ][LIMIT_MAX]); in tg_set_limit()
1672 if (!(tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW] || in tg_set_limit()
1676 tg->bps[READ][LIMIT_LOW] = 0; in tg_set_limit()
1678 tg->iops[READ][LIMIT_LOW] = 0; in tg_set_limit()
1743 if (tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]) in __tg_last_low_overflow_time()
1744 rtime = tg->last_low_overflow_time[READ]; in __tg_last_low_overflow_time()
1767 if (!parent->bps[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1768 !parent->iops[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1813 read_limit = tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]; in throtl_tg_can_upgrade()
1817 if (read_limit && sq->nr_queued[READ] && in throtl_tg_can_upgrade()
1821 (!read_limit || sq->nr_queued[READ])) in throtl_tg_can_upgrade()
1982 if (tg->bps[READ][LIMIT_LOW]) { in throtl_downgrade_check()
1983 bps = tg->last_bytes_disp[READ] * HZ; in throtl_downgrade_check()
1985 if (bps >= tg->bps[READ][LIMIT_LOW]) in throtl_downgrade_check()
1986 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
1996 if (tg->iops[READ][LIMIT_LOW]) { in throtl_downgrade_check()
1997 iops = tg->last_io_disp[READ] * HZ / elapsed_time; in throtl_downgrade_check()
1998 if (iops >= tg->iops[READ][LIMIT_LOW]) in throtl_downgrade_check()
1999 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
2015 tg->last_bytes_disp[READ] = 0; in throtl_downgrade_check()
2017 tg->last_io_disp[READ] = 0; in throtl_downgrade_check()
2049 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2080 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2106 td->avg_buckets[READ][i].latency, in throtl_update_latency_buckets()
2107 td->avg_buckets[READ][i].valid, in throtl_update_latency_buckets()
2191 rw == READ ? 'R' : 'W', in blk_throtl_bio()
2195 sq->nr_queued[READ], sq->nr_queued[WRITE]); in blk_throtl_bio()
2323 while ((bio = throtl_peek_queued(&sq->queued[READ]))) in tg_drain_bios()
2363 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_drain()
2379 td->latency_buckets[READ] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2381 if (!td->latency_buckets[READ]) { in blk_throtl_init()
2388 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2407 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2419 free_percpu(q->td->latency_buckets[READ]); in blk_throtl_exit()
2439 td->avg_buckets[READ][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register_queue()