Lines Matching refs:READ
509 for (rw = READ; rw <= WRITE; rw++) { in throtl_pd_alloc()
515 tg->bps[READ][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
517 tg->iops[READ][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
519 tg->bps_conf[READ][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
521 tg->iops_conf[READ][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
576 for (rw = READ; rw <= WRITE; rw++) in tg_update_has_rules()
603 if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] || in blk_throtl_update_limit_valid()
604 tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) { in blk_throtl_update_limit_valid()
619 tg->bps[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
621 tg->iops[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
791 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice_with_credit()
806 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice()
822 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_extend_slice()
891 rw == READ ? 'R' : 'W', nr_slices, bytes_trim, io_trim, in throtl_trim_slice()
1115 bio = throtl_peek_queued(&sq->queued[READ]); in tg_update_disptime()
1197 while ((bio = throtl_peek_queued(&sq->queued[READ])) && in throtl_dispatch_tg()
1290 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1291 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1352 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1409 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1410 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1448 throtl_start_new_slice(tg, READ); in tg_conf_updated()
1531 .private = offsetof(struct throtl_grp, bps[READ][LIMIT_MAX]),
1543 .private = offsetof(struct throtl_grp, iops[READ][LIMIT_MAX]),
1598 if (tg->bps_conf[READ][off] == bps_dft && in tg_prfill_limit()
1600 tg->iops_conf[READ][off] == iops_dft && in tg_prfill_limit()
1607 if (tg->bps_conf[READ][off] != U64_MAX) in tg_prfill_limit()
1609 tg->bps_conf[READ][off]); in tg_prfill_limit()
1613 if (tg->iops_conf[READ][off] != UINT_MAX) in tg_prfill_limit()
1615 tg->iops_conf[READ][off]); in tg_prfill_limit()
1664 v[0] = tg->bps_conf[READ][index]; in tg_set_limit()
1666 v[2] = tg->iops_conf[READ][index]; in tg_set_limit()
1710 tg->bps_conf[READ][index] = v[0]; in tg_set_limit()
1712 tg->iops_conf[READ][index] = v[2]; in tg_set_limit()
1716 tg->bps[READ][index] = v[0]; in tg_set_limit()
1718 tg->iops[READ][index] = v[2]; in tg_set_limit()
1721 tg->bps[READ][LIMIT_LOW] = min(tg->bps_conf[READ][LIMIT_LOW], in tg_set_limit()
1722 tg->bps_conf[READ][LIMIT_MAX]); in tg_set_limit()
1725 tg->iops[READ][LIMIT_LOW] = min(tg->iops_conf[READ][LIMIT_LOW], in tg_set_limit()
1726 tg->iops_conf[READ][LIMIT_MAX]); in tg_set_limit()
1733 if (!(tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW] || in tg_set_limit()
1737 tg->bps[READ][LIMIT_LOW] = 0; in tg_set_limit()
1739 tg->iops[READ][LIMIT_LOW] = 0; in tg_set_limit()
1804 if (tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]) in __tg_last_low_overflow_time()
1805 rtime = tg->last_low_overflow_time[READ]; in __tg_last_low_overflow_time()
1828 if (!parent->bps[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1829 !parent->iops[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1874 read_limit = tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]; in throtl_tg_can_upgrade()
1878 if (read_limit && sq->nr_queued[READ] && in throtl_tg_can_upgrade()
1882 (!read_limit || sq->nr_queued[READ])) in throtl_tg_can_upgrade()
2043 if (tg->bps[READ][LIMIT_LOW]) { in throtl_downgrade_check()
2044 bps = tg->last_bytes_disp[READ] * HZ; in throtl_downgrade_check()
2046 if (bps >= tg->bps[READ][LIMIT_LOW]) in throtl_downgrade_check()
2047 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
2057 if (tg->iops[READ][LIMIT_LOW]) { in throtl_downgrade_check()
2058 tg->last_io_disp[READ] += atomic_xchg(&tg->last_io_split_cnt[READ], 0); in throtl_downgrade_check()
2059 iops = tg->last_io_disp[READ] * HZ / elapsed_time; in throtl_downgrade_check()
2060 if (iops >= tg->iops[READ][LIMIT_LOW]) in throtl_downgrade_check()
2061 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
2078 tg->last_bytes_disp[READ] = 0; in throtl_downgrade_check()
2080 tg->last_io_disp[READ] = 0; in throtl_downgrade_check()
2116 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2147 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2173 td->avg_buckets[READ][i].latency, in throtl_update_latency_buckets()
2174 td->avg_buckets[READ][i].valid, in throtl_update_latency_buckets()
2287 rw == READ ? 'R' : 'W', in blk_throtl_bio()
2291 sq->nr_queued[READ], sq->nr_queued[WRITE]); in blk_throtl_bio()
2415 td->latency_buckets[READ] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2417 if (!td->latency_buckets[READ]) { in blk_throtl_init()
2424 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2443 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2456 free_percpu(q->td->latency_buckets[READ]); in blk_throtl_exit()
2476 td->avg_buckets[READ][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register_queue()