Lines Matching refs:WRITE

494 	for (rw = READ; rw <= WRITE; rw++) {  in throtl_pd_alloc()
501 tg->bps[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
503 tg->iops[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
505 tg->bps_conf[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
507 tg->iops_conf[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
555 for (rw = READ; rw <= WRITE; rw++) in tg_update_has_rules()
582 if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] || in blk_throtl_update_limit_valid()
583 tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) { in blk_throtl_update_limit_valid()
599 tg->bps[WRITE][LIMIT_LOW] = 0; in throtl_pd_offline()
601 tg->iops[WRITE][LIMIT_LOW] = 0; in throtl_pd_offline()
1088 bio = throtl_peek_queued(&sq->queued[WRITE]); in tg_update_disptime()
1176 while ((bio = throtl_peek_queued(&sq->queued[WRITE])) && in throtl_dispatch_tg()
1255 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1256 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1317 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1374 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1375 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1476 .private = offsetof(struct throtl_grp, bps[WRITE][LIMIT_MAX]),
1488 .private = offsetof(struct throtl_grp, iops[WRITE][LIMIT_MAX]),
1538 tg->bps_conf[WRITE][off] == bps_dft && in tg_prfill_limit()
1540 tg->iops_conf[WRITE][off] == iops_dft && in tg_prfill_limit()
1549 if (tg->bps_conf[WRITE][off] != U64_MAX) in tg_prfill_limit()
1551 tg->bps_conf[WRITE][off]); in tg_prfill_limit()
1555 if (tg->iops_conf[WRITE][off] != UINT_MAX) in tg_prfill_limit()
1557 tg->iops_conf[WRITE][off]); in tg_prfill_limit()
1604 v[1] = tg->bps_conf[WRITE][index]; in tg_set_limit()
1606 v[3] = tg->iops_conf[WRITE][index]; in tg_set_limit()
1650 tg->bps_conf[WRITE][index] = v[1]; in tg_set_limit()
1652 tg->iops_conf[WRITE][index] = v[3]; in tg_set_limit()
1656 tg->bps[WRITE][index] = v[1]; in tg_set_limit()
1658 tg->iops[WRITE][index] = v[3]; in tg_set_limit()
1662 tg->bps[WRITE][LIMIT_LOW] = min(tg->bps_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1663 tg->bps_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1666 tg->iops[WRITE][LIMIT_LOW] = min(tg->iops_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1667 tg->iops_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1673 tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) || in tg_set_limit()
1677 tg->bps[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1679 tg->iops[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1745 if (tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) in __tg_last_low_overflow_time()
1746 wtime = tg->last_low_overflow_time[WRITE]; in __tg_last_low_overflow_time()
1769 !parent->bps[WRITE][LIMIT_LOW] && in tg_last_low_overflow_time()
1770 !parent->iops[WRITE][LIMIT_LOW]) in tg_last_low_overflow_time()
1814 write_limit = tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]; in throtl_tg_can_upgrade()
1818 (!write_limit || sq->nr_queued[WRITE])) in throtl_tg_can_upgrade()
1820 if (write_limit && sq->nr_queued[WRITE] && in throtl_tg_can_upgrade()
1989 if (tg->bps[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
1990 bps = tg->last_bytes_disp[WRITE] * HZ; in throtl_downgrade_check()
1992 if (bps >= tg->bps[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
1993 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
2002 if (tg->iops[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
2003 iops = tg->last_io_disp[WRITE] * HZ / elapsed_time; in throtl_downgrade_check()
2004 if (iops >= tg->iops[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
2005 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
2016 tg->last_bytes_disp[WRITE] = 0; in throtl_downgrade_check()
2018 tg->last_io_disp[WRITE] = 0; in throtl_downgrade_check()
2049 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2080 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2108 td->avg_buckets[WRITE][i].latency, in throtl_update_latency_buckets()
2109 td->avg_buckets[WRITE][i].valid); in throtl_update_latency_buckets()
2195 sq->nr_queued[READ], sq->nr_queued[WRITE]); in blk_throtl_bio()
2325 while ((bio = throtl_peek_queued(&sq->queued[WRITE]))) in tg_drain_bios()
2363 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_drain()
2385 td->latency_buckets[WRITE] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2387 if (!td->latency_buckets[WRITE]) { in blk_throtl_init()
2408 free_percpu(td->latency_buckets[WRITE]); in blk_throtl_init()
2420 free_percpu(q->td->latency_buckets[WRITE]); in blk_throtl_exit()
2440 td->avg_buckets[WRITE][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register_queue()