Lines Matching refs:WRITE

493 	for (rw = READ; rw <= WRITE; rw++) {  in throtl_pd_alloc()
500 tg->bps[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
502 tg->iops[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
504 tg->bps_conf[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
506 tg->iops_conf[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
554 for (rw = READ; rw <= WRITE; rw++) in tg_update_has_rules()
581 if (tg->bps[READ][LIMIT_LOW] || tg->bps[WRITE][LIMIT_LOW] || in blk_throtl_update_limit_valid()
582 tg->iops[READ][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) { in blk_throtl_update_limit_valid()
598 tg->bps[WRITE][LIMIT_LOW] = 0; in throtl_pd_offline()
600 tg->iops[WRITE][LIMIT_LOW] = 0; in throtl_pd_offline()
1100 bio = throtl_peek_queued(&sq->queued[WRITE]); in tg_update_disptime()
1188 while ((bio = throtl_peek_queued(&sq->queued[WRITE])) && in throtl_dispatch_tg()
1267 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1268 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1329 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1386 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1387 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1488 .private = offsetof(struct throtl_grp, bps[WRITE][LIMIT_MAX]),
1500 .private = offsetof(struct throtl_grp, iops[WRITE][LIMIT_MAX]),
1550 tg->bps_conf[WRITE][off] == bps_dft && in tg_prfill_limit()
1552 tg->iops_conf[WRITE][off] == iops_dft && in tg_prfill_limit()
1561 if (tg->bps_conf[WRITE][off] != U64_MAX) in tg_prfill_limit()
1563 tg->bps_conf[WRITE][off]); in tg_prfill_limit()
1567 if (tg->iops_conf[WRITE][off] != UINT_MAX) in tg_prfill_limit()
1569 tg->iops_conf[WRITE][off]); in tg_prfill_limit()
1616 v[1] = tg->bps_conf[WRITE][index]; in tg_set_limit()
1618 v[3] = tg->iops_conf[WRITE][index]; in tg_set_limit()
1662 tg->bps_conf[WRITE][index] = v[1]; in tg_set_limit()
1664 tg->iops_conf[WRITE][index] = v[3]; in tg_set_limit()
1668 tg->bps[WRITE][index] = v[1]; in tg_set_limit()
1670 tg->iops[WRITE][index] = v[3]; in tg_set_limit()
1674 tg->bps[WRITE][LIMIT_LOW] = min(tg->bps_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1675 tg->bps_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1678 tg->iops[WRITE][LIMIT_LOW] = min(tg->iops_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1679 tg->iops_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1685 tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) || in tg_set_limit()
1689 tg->bps[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1691 tg->iops[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1757 if (tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) in __tg_last_low_overflow_time()
1758 wtime = tg->last_low_overflow_time[WRITE]; in __tg_last_low_overflow_time()
1781 !parent->bps[WRITE][LIMIT_LOW] && in tg_last_low_overflow_time()
1782 !parent->iops[WRITE][LIMIT_LOW]) in tg_last_low_overflow_time()
1826 write_limit = tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]; in throtl_tg_can_upgrade()
1830 (!write_limit || sq->nr_queued[WRITE])) in throtl_tg_can_upgrade()
1832 if (write_limit && sq->nr_queued[WRITE] && in throtl_tg_can_upgrade()
2001 if (tg->bps[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
2002 bps = tg->last_bytes_disp[WRITE] * HZ; in throtl_downgrade_check()
2004 if (bps >= tg->bps[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
2005 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
2014 if (tg->iops[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
2015 iops = tg->last_io_disp[WRITE] * HZ / elapsed_time; in throtl_downgrade_check()
2016 if (iops >= tg->iops[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
2017 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
2028 tg->last_bytes_disp[WRITE] = 0; in throtl_downgrade_check()
2030 tg->last_io_disp[WRITE] = 0; in throtl_downgrade_check()
2061 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2092 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2120 td->avg_buckets[WRITE][i].latency, in throtl_update_latency_buckets()
2121 td->avg_buckets[WRITE][i].valid); in throtl_update_latency_buckets()
2221 sq->nr_queued[READ], sq->nr_queued[WRITE]); in blk_throtl_bio()
2350 while ((bio = throtl_peek_queued(&sq->queued[WRITE]))) in tg_drain_bios()
2389 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_drain()
2411 td->latency_buckets[WRITE] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2413 if (!td->latency_buckets[WRITE]) { in blk_throtl_init()
2434 free_percpu(td->latency_buckets[WRITE]); in blk_throtl_init()
2446 free_percpu(q->td->latency_buckets[WRITE]); in blk_throtl_exit()
2466 td->avg_buckets[WRITE][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register_queue()