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()
604 if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] || in blk_throtl_update_limit_valid()
605 tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) { in blk_throtl_update_limit_valid()
625 tg->bps[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
627 tg->iops[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
797 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice_with_credit()
812 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice()
828 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_extend_slice()
897 rw == READ ? 'R' : 'W', nr_slices, bytes_trim, io_trim, in throtl_trim_slice()
1123 bio = throtl_peek_queued(&sq->queued[READ]); in tg_update_disptime()
1205 while ((bio = throtl_peek_queued(&sq->queued[READ])) && in throtl_dispatch_tg()
1298 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1299 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1360 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1417 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1418 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1456 throtl_start_new_slice(tg, READ); in tg_conf_updated()
1539 .private = offsetof(struct throtl_grp, bps[READ][LIMIT_MAX]),
1551 .private = offsetof(struct throtl_grp, iops[READ][LIMIT_MAX]),
1606 if (tg->bps_conf[READ][off] == bps_dft && in tg_prfill_limit()
1608 tg->iops_conf[READ][off] == iops_dft && in tg_prfill_limit()
1615 if (tg->bps_conf[READ][off] != U64_MAX) in tg_prfill_limit()
1617 tg->bps_conf[READ][off]); in tg_prfill_limit()
1621 if (tg->iops_conf[READ][off] != UINT_MAX) in tg_prfill_limit()
1623 tg->iops_conf[READ][off]); in tg_prfill_limit()
1672 v[0] = tg->bps_conf[READ][index]; in tg_set_limit()
1674 v[2] = tg->iops_conf[READ][index]; in tg_set_limit()
1718 tg->bps_conf[READ][index] = v[0]; in tg_set_limit()
1720 tg->iops_conf[READ][index] = v[2]; in tg_set_limit()
1724 tg->bps[READ][index] = v[0]; in tg_set_limit()
1726 tg->iops[READ][index] = v[2]; in tg_set_limit()
1729 tg->bps[READ][LIMIT_LOW] = min(tg->bps_conf[READ][LIMIT_LOW], in tg_set_limit()
1730 tg->bps_conf[READ][LIMIT_MAX]); in tg_set_limit()
1733 tg->iops[READ][LIMIT_LOW] = min(tg->iops_conf[READ][LIMIT_LOW], in tg_set_limit()
1734 tg->iops_conf[READ][LIMIT_MAX]); in tg_set_limit()
1741 if (!(tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW] || in tg_set_limit()
1745 tg->bps[READ][LIMIT_LOW] = 0; in tg_set_limit()
1747 tg->iops[READ][LIMIT_LOW] = 0; in tg_set_limit()
1812 if (tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]) in __tg_last_low_overflow_time()
1813 rtime = tg->last_low_overflow_time[READ]; in __tg_last_low_overflow_time()
1836 if (!parent->bps[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1837 !parent->iops[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1882 read_limit = tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]; in throtl_tg_can_upgrade()
1886 if (read_limit && sq->nr_queued[READ] && in throtl_tg_can_upgrade()
1890 (!read_limit || sq->nr_queued[READ])) in throtl_tg_can_upgrade()
2051 if (tg->bps[READ][LIMIT_LOW]) { in throtl_downgrade_check()
2052 bps = tg->last_bytes_disp[READ] * HZ; in throtl_downgrade_check()
2054 if (bps >= tg->bps[READ][LIMIT_LOW]) in throtl_downgrade_check()
2055 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
2065 if (tg->iops[READ][LIMIT_LOW]) { in throtl_downgrade_check()
2066 tg->last_io_disp[READ] += atomic_xchg(&tg->last_io_split_cnt[READ], 0); in throtl_downgrade_check()
2067 iops = tg->last_io_disp[READ] * HZ / elapsed_time; in throtl_downgrade_check()
2068 if (iops >= tg->iops[READ][LIMIT_LOW]) in throtl_downgrade_check()
2069 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
2086 tg->last_bytes_disp[READ] = 0; in throtl_downgrade_check()
2088 tg->last_io_disp[READ] = 0; in throtl_downgrade_check()
2124 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2155 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2181 td->avg_buckets[READ][i].latency, in throtl_update_latency_buckets()
2182 td->avg_buckets[READ][i].valid, in throtl_update_latency_buckets()
2295 rw == READ ? 'R' : 'W', in blk_throtl_bio()
2299 sq->nr_queued[READ], sq->nr_queued[WRITE]); in blk_throtl_bio()
2423 td->latency_buckets[READ] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2425 if (!td->latency_buckets[READ]) { in blk_throtl_init()
2432 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2451 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2464 free_percpu(q->td->latency_buckets[READ]); in blk_throtl_exit()
2484 td->avg_buckets[READ][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register_queue()