Lines Matching refs:goal
307 struct damos_quota_goal *goal;
309 goal = kmalloc(sizeof(*goal), GFP_KERNEL);
310 if (!goal)
312 goal->metric = metric;
313 goal->target_value = target_value;
314 INIT_LIST_HEAD(&goal->list);
315 return goal;
1105 * next_input = max(last_input * ((goal - current) / goal + 1), 1)
1115 const unsigned long goal = 10000;
1116 unsigned long score_goal_diff = max(goal, score) - min(goal, score);
1117 unsigned long score_goal_diff_bp = score_goal_diff * 10000 / goal;
1122 if (goal > score)
1148 static void damos_set_quota_goal_current_value(struct damos_quota_goal *goal)
1152 switch (goal->metric) {
1154 /* User should already set goal->current_value */
1158 goal->current_value = now_psi_total - goal->last_psi_total;
1159 goal->last_psi_total = now_psi_total;
1169 struct damos_quota_goal *goal;
1172 damos_for_each_quota_goal(goal, quota) {
1173 damos_set_quota_goal_current_value(goal);
1175 goal->current_value * 10000 /
1176 goal->target_value);