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 */
501 * than issue. The delta behind `vtime` represents the cost of
712 static u64 cost_to_abs_cost(u64 cost, u32 hw_inuse)
714 return DIV64_U64_ROUND_UP(cost * hw_inuse, WEIGHT_ONE);
718 u64 abs_cost, u64 cost)
722 bio->bi_iocost_cost = cost;
723 atomic64_add(cost, &iocg->vtime);
862 * and calculate the linear model cost coefficients.
864 * *@page per-page cost 1s / (@bps / 4096)
865 * *@seqio base cost of a seq IO max((1s / @seqiops) - *@page, 0)
866 * @randiops base cost of a rand IO max((1s / @randiops) - *@page, 0)
1466 u64 cost = abs_cost_to_cost(wait->abs_cost, ctx->hw_inuse);
1468 ctx->vbudget -= cost;
1473 iocg_commit_bio(ctx->iocg, wait->bio, wait->abs_cost, cost);
2468 u64 cost, new_inuse;
2473 cost = abs_cost_to_cost(abs_cost, hwi);
2474 margin = now->vnow - vtime - cost;
2478 return cost;
2486 return cost;
2493 return cost;
2509 cost = abs_cost_to_cost(abs_cost, hwi);
2510 } while (time_after64(vtime + cost, now->vnow) &&
2518 return cost;
2528 u64 cost = 0;
2530 /* Can't calculate cost for empty bio */
2556 cost += coef_randio;
2558 cost += coef_seqio;
2561 cost += pages * coef_page;
2563 *costp = cost;
2568 u64 cost;
2570 calc_vtime_cost_builtin(bio, iocg, is_merge, &cost);
2571 return cost;
2593 u64 cost;
2595 calc_size_vtime_cost_builtin(rq, ioc, &cost);
2596 return cost;
2606 u64 abs_cost, cost, vtime;
2614 /* calculate the absolute vtime cost */
2624 cost = adjust_inuse_and_calc_cost(iocg, vtime, abs_cost, &now);
2632 time_before_eq64(vtime + cost, now.vnow)) {
2633 iocg_commit_bio(iocg, bio, abs_cost, cost);
2658 iocg_commit_bio(iocg, bio, abs_cost, cost);
2703 * or too long. Each wait entry records the absolute cost it's
2741 u64 vtime, abs_cost, cost;
2755 cost = adjust_inuse_and_calc_cost(iocg, vtime, abs_cost, &now);
2764 * cost assigned.
2767 time_before_eq64(atomic64_read(&iocg->vtime) + cost, now.vnow)) {
2768 iocg_commit_bio(iocg, bio, abs_cost, cost);
2786 iocg_commit_bio(iocg, bio, abs_cost, cost);
3053 seq_printf(s, " cost.vrate=%u.%02u", vp10k / 100, vp10k % 100);
3056 seq_printf(s, " cost.usage=%llu", iocg->last_stat.usage_us);
3059 seq_printf(s, " cost.wait=%llu cost.indebt=%llu cost.indelay=%llu",
3512 .name = "cost.qos",
3518 .name = "cost.model",