Lines Matching refs:READ

506 	for (rw = READ; rw <= WRITE; rw++) {  in throtl_pd_alloc()
512 tg->bps[READ][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
514 tg->iops[READ][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
516 tg->bps_conf[READ][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
518 tg->iops_conf[READ][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
573 for (rw = READ; rw <= WRITE; rw++) in tg_update_has_rules()
600 if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] || in blk_throtl_update_limit_valid()
601 tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) { in blk_throtl_update_limit_valid()
616 tg->bps[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
618 tg->iops[READ][LIMIT_LOW] = 0; in throtl_pd_offline()
786 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice_with_credit()
798 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_start_new_slice()
814 rw == READ ? 'R' : 'W', tg->slice_start[rw], in throtl_extend_slice()
883 rw == READ ? 'R' : 'W', nr_slices, bytes_trim, io_trim, in throtl_trim_slice()
1106 bio = throtl_peek_queued(&sq->queued[READ]); in tg_update_disptime()
1188 while ((bio = throtl_peek_queued(&sq->queued[READ])) && in throtl_dispatch_tg()
1281 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1282 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1343 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1400 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1401 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1439 throtl_start_new_slice(tg, READ); in tg_conf_updated()
1522 .private = offsetof(struct throtl_grp, bps[READ][LIMIT_MAX]),
1534 .private = offsetof(struct throtl_grp, iops[READ][LIMIT_MAX]),
1589 if (tg->bps_conf[READ][off] == bps_dft && in tg_prfill_limit()
1591 tg->iops_conf[READ][off] == iops_dft && in tg_prfill_limit()
1598 if (tg->bps_conf[READ][off] != U64_MAX) in tg_prfill_limit()
1600 tg->bps_conf[READ][off]); in tg_prfill_limit()
1604 if (tg->iops_conf[READ][off] != UINT_MAX) in tg_prfill_limit()
1606 tg->iops_conf[READ][off]); in tg_prfill_limit()
1655 v[0] = tg->bps_conf[READ][index]; in tg_set_limit()
1657 v[2] = tg->iops_conf[READ][index]; in tg_set_limit()
1701 tg->bps_conf[READ][index] = v[0]; in tg_set_limit()
1703 tg->iops_conf[READ][index] = v[2]; in tg_set_limit()
1707 tg->bps[READ][index] = v[0]; in tg_set_limit()
1709 tg->iops[READ][index] = v[2]; in tg_set_limit()
1712 tg->bps[READ][LIMIT_LOW] = min(tg->bps_conf[READ][LIMIT_LOW], in tg_set_limit()
1713 tg->bps_conf[READ][LIMIT_MAX]); in tg_set_limit()
1716 tg->iops[READ][LIMIT_LOW] = min(tg->iops_conf[READ][LIMIT_LOW], in tg_set_limit()
1717 tg->iops_conf[READ][LIMIT_MAX]); in tg_set_limit()
1724 if (!(tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW] || in tg_set_limit()
1728 tg->bps[READ][LIMIT_LOW] = 0; in tg_set_limit()
1730 tg->iops[READ][LIMIT_LOW] = 0; in tg_set_limit()
1795 if (tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]) in __tg_last_low_overflow_time()
1796 rtime = tg->last_low_overflow_time[READ]; in __tg_last_low_overflow_time()
1819 if (!parent->bps[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1820 !parent->iops[READ][LIMIT_LOW] && in tg_last_low_overflow_time()
1865 read_limit = tg->bps[READ][LIMIT_LOW] || tg->iops[READ][LIMIT_LOW]; in throtl_tg_can_upgrade()
1869 if (read_limit && sq->nr_queued[READ] && in throtl_tg_can_upgrade()
1873 (!read_limit || sq->nr_queued[READ])) in throtl_tg_can_upgrade()
2034 if (tg->bps[READ][LIMIT_LOW]) { in throtl_downgrade_check()
2035 bps = tg->last_bytes_disp[READ] * HZ; in throtl_downgrade_check()
2037 if (bps >= tg->bps[READ][LIMIT_LOW]) in throtl_downgrade_check()
2038 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
2048 if (tg->iops[READ][LIMIT_LOW]) { in throtl_downgrade_check()
2049 iops = tg->last_io_disp[READ] * HZ / elapsed_time; in throtl_downgrade_check()
2050 if (iops >= tg->iops[READ][LIMIT_LOW]) in throtl_downgrade_check()
2051 tg->last_low_overflow_time[READ] = now; in throtl_downgrade_check()
2067 tg->last_bytes_disp[READ] = 0; in throtl_downgrade_check()
2069 tg->last_io_disp[READ] = 0; in throtl_downgrade_check()
2105 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2136 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2162 td->avg_buckets[READ][i].latency, in throtl_update_latency_buckets()
2163 td->avg_buckets[READ][i].valid, in throtl_update_latency_buckets()
2257 rw == READ ? 'R' : 'W', in blk_throtl_bio()
2261 sq->nr_queued[READ], sq->nr_queued[WRITE]); in blk_throtl_bio()
2385 td->latency_buckets[READ] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2387 if (!td->latency_buckets[READ]) { in blk_throtl_init()
2394 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2413 free_percpu(td->latency_buckets[READ]); in blk_throtl_init()
2425 free_percpu(q->td->latency_buckets[READ]); in blk_throtl_exit()
2445 td->avg_buckets[READ][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register_queue()