Lines Matching refs:WRITE
510 for (rw = READ; rw <= WRITE; rw++) { in throtl_pd_alloc()
517 tg->bps[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
519 tg->iops[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
521 tg->bps_conf[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
523 tg->iops_conf[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
577 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()
621 tg->bps[WRITE][LIMIT_LOW] = 0; in throtl_pd_offline()
623 tg->iops[WRITE][LIMIT_LOW] = 0; in throtl_pd_offline()
1120 bio = throtl_peek_queued(&sq->queued[WRITE]); in tg_update_disptime()
1208 while ((bio = throtl_peek_queued(&sq->queued[WRITE])) && in throtl_dispatch_tg()
1291 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1292 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1353 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1410 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1411 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1450 throtl_start_new_slice(tg, WRITE); in tg_conf_updated()
1568 .private = offsetof(struct throtl_grp, bps[WRITE][LIMIT_MAX]),
1580 .private = offsetof(struct throtl_grp, iops[WRITE][LIMIT_MAX]),
1630 tg->bps_conf[WRITE][off] == bps_dft && in tg_prfill_limit()
1632 tg->iops_conf[WRITE][off] == iops_dft && in tg_prfill_limit()
1641 if (tg->bps_conf[WRITE][off] != U64_MAX) in tg_prfill_limit()
1643 tg->bps_conf[WRITE][off]); in tg_prfill_limit()
1647 if (tg->iops_conf[WRITE][off] != UINT_MAX) in tg_prfill_limit()
1649 tg->iops_conf[WRITE][off]); in tg_prfill_limit()
1699 v[1] = tg->bps_conf[WRITE][index]; in tg_set_limit()
1701 v[3] = tg->iops_conf[WRITE][index]; in tg_set_limit()
1745 tg->bps_conf[WRITE][index] = v[1]; in tg_set_limit()
1747 tg->iops_conf[WRITE][index] = v[3]; in tg_set_limit()
1751 tg->bps[WRITE][index] = v[1]; in tg_set_limit()
1753 tg->iops[WRITE][index] = v[3]; in tg_set_limit()
1757 tg->bps[WRITE][LIMIT_LOW] = min(tg->bps_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1758 tg->bps_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1761 tg->iops[WRITE][LIMIT_LOW] = min(tg->iops_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1762 tg->iops_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1768 tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) || in tg_set_limit()
1772 tg->bps[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1774 tg->iops[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1841 if (tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) in __tg_last_low_overflow_time()
1842 wtime = tg->last_low_overflow_time[WRITE]; in __tg_last_low_overflow_time()
1865 !parent->bps[WRITE][LIMIT_LOW] && in tg_last_low_overflow_time()
1866 !parent->iops[WRITE][LIMIT_LOW]) in tg_last_low_overflow_time()
1910 write_limit = tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]; in throtl_tg_can_upgrade()
1914 (!write_limit || sq->nr_queued[WRITE])) in throtl_tg_can_upgrade()
1916 if (write_limit && sq->nr_queued[WRITE] && in throtl_tg_can_upgrade()
2085 if (tg->bps[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
2086 bps = tg->last_bytes_disp[WRITE] * HZ; in throtl_downgrade_check()
2088 if (bps >= tg->bps[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
2089 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
2099 if (tg->iops[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
2100 tg->last_io_disp[WRITE] += atomic_xchg(&tg->last_io_split_cnt[WRITE], 0); in throtl_downgrade_check()
2101 iops = tg->last_io_disp[WRITE] * HZ / elapsed_time; in throtl_downgrade_check()
2102 if (iops >= tg->iops[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
2103 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
2114 tg->last_bytes_disp[WRITE] = 0; in throtl_downgrade_check()
2116 tg->last_io_disp[WRITE] = 0; in throtl_downgrade_check()
2151 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2182 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2210 td->avg_buckets[WRITE][i].latency, in throtl_update_latency_buckets()
2211 td->avg_buckets[WRITE][i].valid); in throtl_update_latency_buckets()
2326 sq->nr_queued[READ], sq->nr_queued[WRITE]); in blk_throtl_bio()
2456 td->latency_buckets[WRITE] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2458 if (!td->latency_buckets[WRITE]) { in blk_throtl_init()
2479 free_percpu(td->latency_buckets[WRITE]); in blk_throtl_init()
2492 free_percpu(q->td->latency_buckets[WRITE]); in blk_throtl_exit()
2512 td->avg_buckets[WRITE][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register_queue()