Lines Matching refs:cost

3  * IO cost model based controller.
10 * observable cost metric. This is distinguished from CPU and memory where
22 * While there is no cost metric we can trivially observe, it isn't a
23 * complete mystery. For example, on a rotational device, seek cost
32 * IO cost model estimates the cost of an IO given its basic parameters and
33 * history (e.g. the end sector of the last IO). The cost is measured in
34 * device time. If a given IO is estimated to cost 10ms, the device should
37 * Currently, there's only one builtin cost model - linear. Each IO is
38 * classified as sequential or random and given a base cost accordingly.
39 * On top of that, a size cost proportional to the length of the IO is
44 * /sys/fs/cgroup/io.cost.model.
86 * It's unrealistic to expect the cost model to be perfect. There are too
123 * and can be set through /sys/fs/cgroup/io.cost.qos.
130 * cost per second, i.e., 10% of the device capacity. The naive
133 * compared to free-for-all competition. This is too high a cost to pay
170 * - inflt : The percentage of in-flight IO cost at the end of last period
239 * As vtime is used to calculate the cost of each IO, it needs to
241 * represent the cost of a single page worth of discard with
306 * size-proportional components of cost calculation in closer
307 * numbers of digits to per-IO cost components.
323 /* io.cost.qos controls including per-dev enable of the whole controller */
330 /* io.cost.qos params */
341 /* io.cost.model controls */
348 /* builtin linear cost model coefficients */
503 * than issue. The delta behind `vtime` represents the cost of
720 static u64 cost_to_abs_cost(u64 cost, u32 hw_inuse)
722 return DIV64_U64_ROUND_UP(cost * hw_inuse, WEIGHT_ONE);
726 u64 abs_cost, u64 cost)
730 bio->bi_iocost_cost = cost;
731 atomic64_add(cost, &iocg->vtime);
866 * and calculate the linear model cost coefficients.
868 * *@page per-page cost 1s / (@bps / 4096)
869 * *@seqio base cost of a seq IO max((1s / @seqiops) - *@page, 0)
870 * @randiops base cost of a rand IO max((1s / @randiops) - *@page, 0)
1405 u64 cost = abs_cost_to_cost(wait->abs_cost, ctx->hw_inuse);
1407 ctx->vbudget -= cost;
1412 iocg_commit_bio(ctx->iocg, wait->bio, wait->abs_cost, cost);
2435 u64 cost, new_inuse;
2440 cost = abs_cost_to_cost(abs_cost, hwi);
2441 margin = now->vnow - vtime - cost;
2445 return cost;
2453 return cost;
2460 return cost;
2476 cost = abs_cost_to_cost(abs_cost, hwi);
2477 } while (time_after64(vtime + cost, now->vnow) &&
2485 return cost;
2495 u64 cost = 0;
2519 cost += coef_randio;
2521 cost += coef_seqio;
2524 cost += pages * coef_page;
2526 *costp = cost;
2531 u64 cost;
2533 calc_vtime_cost_builtin(bio, iocg, is_merge, &cost);
2534 return cost;
2556 u64 cost;
2558 calc_size_vtime_cost_builtin(rq, ioc, &cost);
2559 return cost;
2569 u64 abs_cost, cost, vtime;
2577 /* calculate the absolute vtime cost */
2587 cost = adjust_inuse_and_calc_cost(iocg, vtime, abs_cost, &now);
2595 time_before_eq64(vtime + cost, now.vnow)) {
2596 iocg_commit_bio(iocg, bio, abs_cost, cost);
2621 iocg_commit_bio(iocg, bio, abs_cost, cost);
2666 * or too long. Each wait entry records the absolute cost it's
2704 u64 vtime, abs_cost, cost;
2718 cost = adjust_inuse_and_calc_cost(iocg, vtime, abs_cost, &now);
2727 * cost assigned.
2730 time_before_eq64(atomic64_read(&iocg->vtime) + cost, now.vnow)) {
2731 iocg_commit_bio(iocg, bio, abs_cost, cost);
2749 iocg_commit_bio(iocg, bio, abs_cost, cost);
3016 pos += scnprintf(buf + pos, size - pos, " cost.vrate=%u.%02u",
3020 pos += scnprintf(buf + pos, size - pos, " cost.usage=%llu",
3025 " cost.wait=%llu cost.indebt=%llu cost.indelay=%llu",
3428 .name = "cost.qos",
3434 .name = "cost.model",