Lines Matching refs:WRITE
362 for (rw = READ; rw <= WRITE; rw++) { in throtl_pd_alloc()
369 tg->bps[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
371 tg->iops[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
373 tg->bps_conf[WRITE][LIMIT_MAX] = U64_MAX; in throtl_pd_alloc()
375 tg->iops_conf[WRITE][LIMIT_MAX] = UINT_MAX; in throtl_pd_alloc()
429 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()
980 bio = throtl_peek_queued(&sq->queued[WRITE]); in tg_update_disptime()
1068 while ((bio = throtl_peek_queued(&sq->queued[WRITE])) && in throtl_dispatch_tg()
1151 sq->nr_queued[READ] + sq->nr_queued[WRITE], in throtl_pending_timer_fn()
1152 sq->nr_queued[READ], sq->nr_queued[WRITE]); in throtl_pending_timer_fn()
1213 for (rw = READ; rw <= WRITE; rw++) in blk_throtl_dispatch_work_fn()
1270 tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE), in tg_conf_updated()
1271 tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); in tg_conf_updated()
1310 throtl_start_new_slice(tg, WRITE); in tg_conf_updated()
1398 .private = offsetof(struct throtl_grp, bps[WRITE][LIMIT_MAX]),
1410 .private = offsetof(struct throtl_grp, iops[WRITE][LIMIT_MAX]),
1460 tg->bps_conf[WRITE][off] == bps_dft && in tg_prfill_limit()
1462 tg->iops_conf[WRITE][off] == iops_dft && in tg_prfill_limit()
1471 if (tg->bps_conf[WRITE][off] != U64_MAX) in tg_prfill_limit()
1473 tg->bps_conf[WRITE][off]); in tg_prfill_limit()
1477 if (tg->iops_conf[WRITE][off] != UINT_MAX) in tg_prfill_limit()
1479 tg->iops_conf[WRITE][off]); in tg_prfill_limit()
1526 v[1] = tg->bps_conf[WRITE][index]; in tg_set_limit()
1528 v[3] = tg->iops_conf[WRITE][index]; in tg_set_limit()
1572 tg->bps_conf[WRITE][index] = v[1]; in tg_set_limit()
1574 tg->iops_conf[WRITE][index] = v[3]; in tg_set_limit()
1578 tg->bps[WRITE][index] = v[1]; in tg_set_limit()
1580 tg->iops[WRITE][index] = v[3]; in tg_set_limit()
1584 tg->bps[WRITE][LIMIT_LOW] = min(tg->bps_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1585 tg->bps_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1588 tg->iops[WRITE][LIMIT_LOW] = min(tg->iops_conf[WRITE][LIMIT_LOW], in tg_set_limit()
1589 tg->iops_conf[WRITE][LIMIT_MAX]); in tg_set_limit()
1595 tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) || in tg_set_limit()
1599 tg->bps[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1601 tg->iops[WRITE][LIMIT_LOW] = 0; in tg_set_limit()
1667 if (tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]) in __tg_last_low_overflow_time()
1668 wtime = tg->last_low_overflow_time[WRITE]; in __tg_last_low_overflow_time()
1691 !parent->bps[WRITE][LIMIT_LOW] && in tg_last_low_overflow_time()
1692 !parent->iops[WRITE][LIMIT_LOW]) in tg_last_low_overflow_time()
1736 write_limit = tg->bps[WRITE][LIMIT_LOW] || tg->iops[WRITE][LIMIT_LOW]; in throtl_tg_can_upgrade()
1740 (!write_limit || sq->nr_queued[WRITE])) in throtl_tg_can_upgrade()
1742 if (write_limit && sq->nr_queued[WRITE] && in throtl_tg_can_upgrade()
1911 if (tg->bps[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
1912 bps = tg->last_bytes_disp[WRITE] * HZ; in throtl_downgrade_check()
1914 if (bps >= tg->bps[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
1915 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
1925 if (tg->iops[WRITE][LIMIT_LOW]) { in throtl_downgrade_check()
1926 tg->last_io_disp[WRITE] += atomic_xchg(&tg->last_io_split_cnt[WRITE], 0); in throtl_downgrade_check()
1927 iops = tg->last_io_disp[WRITE] * HZ / elapsed_time; in throtl_downgrade_check()
1928 if (iops >= tg->iops[WRITE][LIMIT_LOW]) in throtl_downgrade_check()
1929 tg->last_low_overflow_time[WRITE] = now; in throtl_downgrade_check()
1940 tg->last_bytes_disp[WRITE] = 0; in throtl_downgrade_check()
1942 tg->last_io_disp[WRITE] = 0; in throtl_downgrade_check()
1977 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2008 for (rw = READ; rw <= WRITE; rw++) { in throtl_update_latency_buckets()
2036 td->avg_buckets[WRITE][i].latency, in throtl_update_latency_buckets()
2037 td->avg_buckets[WRITE][i].valid); in throtl_update_latency_buckets()
2145 sq->nr_queued[READ], sq->nr_queued[WRITE]); in __blk_throtl_bio()
2274 td->latency_buckets[WRITE] = __alloc_percpu(sizeof(struct latency_bucket) * in blk_throtl_init()
2276 if (!td->latency_buckets[WRITE]) { in blk_throtl_init()
2297 free_percpu(td->latency_buckets[WRITE]); in blk_throtl_init()
2310 free_percpu(q->td->latency_buckets[WRITE]); in blk_throtl_exit()
2330 td->avg_buckets[WRITE][i].latency = DFL_HD_BASELINE_LATENCY; in blk_throtl_register_queue()