Lines Matching defs:pos_ratio

975 	long long pos_ratio;
980 pos_ratio = x;
981 pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT;
982 pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT;
983 pos_ratio += 1 << RATELIMIT_CALC_SHIFT;
985 return clamp(pos_ratio, 0LL, 2LL << RATELIMIT_CALC_SHIFT);
998 * pos_ratio = 1 << RATELIMIT_CALC_SHIFT
1000 * if (dirty < setpoint) scale up pos_ratio
1001 * if (dirty > setpoint) scale down pos_ratio
1003 * if (wb_dirty < wb_setpoint) scale up pos_ratio
1004 * if (wb_dirty > wb_setpoint) scale down pos_ratio
1006 * task_ratelimit = dirty_ratelimit * pos_ratio >> RATELIMIT_CALC_SHIFT
1010 * ^ pos_ratio
1031 * ^ pos_ratio
1057 * The wb control line won't drop below pos_ratio=1/4, so that wb_dirty can
1074 long long pos_ratio; /* for scaling up/down the rate limit */
1077 dtc->pos_ratio = 0;
1088 pos_ratio = pos_ratio_polynom(setpoint, dtc->dirty, limit);
1098 * Here, in wb_position_ratio(), we calculate pos_ratio based on
1130 * and pos_ratio >> wb_pos_ratio. In the other words global
1133 * important case when global pos_ratio should get precedence:
1137 * "pos_ratio * wb_pos_ratio" would work for the case above,
1143 * control system. Normally, pos_ratio value can be well over 3
1145 * setpoint). Now the maximum pos_ratio in the same situation
1149 dtc->pos_ratio = min(pos_ratio, wb_pos_ratio);
1154 * We have computed basic pos_ratio above based on global situation. If
1156 * pos_ratio further down/up. That is done by the following mechanism.
1178 * fluctuation range for pos_ratio.
1182 * yields 100% pos_ratio fluctuation on suddenly doubled wb_thresh.
1204 pos_ratio = div64_u64(pos_ratio * (x_intercept - dtc->wb_dirty),
1207 pos_ratio /= 4;
1217 pos_ratio = div_u64(pos_ratio * x_intercept,
1220 pos_ratio *= 8;
1223 dtc->pos_ratio = pos_ratio;
1358 dtc->pos_ratio >> RATELIMIT_CALC_SHIFT;
1369 * but also takes pos_ratio into account:
1370 * rate_(i+1) = rate_(i) * (write_bw / dirty_rate) * pos_ratio (2)
1372 * (1) is not realistic because pos_ratio also takes part in balancing
1374 * pos_ratio = 0.5 (3)
1378 * task_ratelimit = pos_ratio * rate = (write_bw / N) (5)
1386 * regardless of the value of pos_ratio. As long as (8) is satisfied,
1387 * pos_ratio is able to drive itself to 1.0, which is not only where
1389 * pos_ratio is most flat and hence task_ratelimit is least fluctuated.
1411 * = (pos_ratio - 1) * dirty_ratelimit
1437 * and limits (starting from pos_ratio = wb_position_ratio() and up to
1781 * The limits fields dirty_exceeded and pos_ratio won't be updated if wb is
1881 * Calculate global domain's pos_ratio and select the
1892 * pos_ratio. @wb should satisfy constraints from
1894 * w/ lower pos_ratio.
1899 if (mdtc->pos_ratio < gdtc->pos_ratio)
1911 task_ratelimit = ((u64)dirty_ratelimit * sdtc->pos_ratio) >>