Lines Matching refs:WRITE
333 INIT_LIST_HEAD(&sq->queued[WRITE]); in throtl_service_queue_init()
357 for (rw = READ; rw <= WRITE; rw++) { in throtl_pd_alloc()
364 tg->bps[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
366 tg->iops[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
368 tg->bps_conf[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
370 tg->iops_conf[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
424 for (rw = READ; rw <= WRITE; rw++) { in tg_update_has_rules()
457 if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] || in blk_throtl_update_limit_valid()
458 tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) { in blk_throtl_update_limit_valid()
479 tg->bps[WRITE][LIMIT_LOW] = 0; in throtl_pd_offline()
481 tg->iops[WRITE][LIMIT_LOW] = 0; in throtl_pd_offline()
815 if (tg->service_queue.nr_queued[WRITE]) in tg_update_carryover()
816 __tg_update_carryover(tg, WRITE); in tg_update_carryover()
820 tg->carryover_bytes[READ], tg->carryover_bytes[WRITE], in tg_update_carryover()
821 tg->carryover_ios[READ], tg->carryover_ios[WRITE]); in tg_update_carryover()
1025 bio = throtl_peek_queued(&sq->queued[WRITE]); in tg_update_disptime()
1114 while ((bio = throtl_peek_queued(&sq->queued[WRITE])) && in throtl_dispatch_tg()
1148 if (sq->nr_queued[READ] || sq->nr_queued[WRITE]) in throtl_select_dispatch()
1207 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1208 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1269 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1326 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1327 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1366 throtl_start_new_slice(tg, WRITE, false); in tg_conf_updated()
1455 .private = offsetof(struct throtl_grp, bps[WRITE][LIMIT_MAX]),
1467 .private = offsetof(struct throtl_grp, iops[WRITE][LIMIT_MAX]),
1517 tg->bps_conf[WRITE][off] == bps_dft && in tg_prfill_limit()
1519 tg->iops_conf[WRITE][off] == iops_dft && in tg_prfill_limit()
1528 if (tg->bps_conf[WRITE][off] != U64_MAX) in tg_prfill_limit()
1530 tg->bps_conf[WRITE][off]); in tg_prfill_limit()
1534 if (tg->iops_conf[WRITE][off] != UINT_MAX) in tg_prfill_limit()
1536 tg->iops_conf[WRITE][off]); in tg_prfill_limit()
1584 v[1] = tg->bps_conf[WRITE][index]; in tg_set_limit()
1586 v[3] = tg->iops_conf[WRITE][index]; in tg_set_limit()
1630 tg->bps_conf[WRITE][index] = v[1]; in tg_set_limit()
1632 tg->iops_conf[WRITE][index] = v[3]; in tg_set_limit()
1636 tg->bps[WRITE][index] = v[1]; in tg_set_limit()
1638 tg->iops[WRITE][index] = v[3]; in tg_set_limit()
1642 tg->bps[WRITE][LIMIT_LOW] = min(tg->bps_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1643 tg->bps_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1646 tg->iops[WRITE][LIMIT_LOW] = min(tg->iops_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1647 tg->iops_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1653 tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) || in tg_set_limit()
1657 tg->bps[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1659 tg->iops[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1760 if (tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) in __tg_last_low_overflow_time()
1761 wtime = tg->last_low_overflow_time[WRITE]; in __tg_last_low_overflow_time()
1784 !parent->bps[WRITE][LIMIT_LOW] && in tg_last_low_overflow_time()
1785 !parent->iops[WRITE][LIMIT_LOW]) in tg_last_low_overflow_time()
1829 write_limit = tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]; in throtl_tg_can_upgrade()
1833 (!write_limit || sq->nr_queued[WRITE])) in throtl_tg_can_upgrade()
1835 if (write_limit && sq->nr_queued[WRITE] && in throtl_tg_can_upgrade()
2004 if (tg->bps[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
2005 bps = tg->last_bytes_disp[WRITE] * HZ; in throtl_downgrade_check()
2007 if (bps >= tg->bps[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
2008 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
2017 if (tg->iops[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
2018 iops = tg->last_io_disp[WRITE] * HZ / elapsed_time; in throtl_downgrade_check()
2019 if (iops >= tg->iops[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
2020 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
2031 tg->last_bytes_disp[WRITE] = 0; in throtl_downgrade_check()
2033 tg->last_io_disp[WRITE] = 0; in throtl_downgrade_check()
2067 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2098 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2126 td->avg_buckets[WRITE][i].latency, in throtl_update_latency_buckets()
2127 td->avg_buckets[WRITE][i].valid); in throtl_update_latency_buckets()
2240 sq->nr_queued[READ], sq->nr_queued[WRITE]); in __blk_throtl_bio()
2370 td->latency_buckets[WRITE] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2372 if (!td->latency_buckets[WRITE]) { in blk_throtl_init()
2393 free_percpu(td->latency_buckets[WRITE]); in blk_throtl_init()
2408 free_percpu(q->td->latency_buckets[WRITE]); in blk_throtl_exit()
2429 td->avg_buckets[WRITE][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register()