Lines Matching full:goal

307 	struct damos_quota_goal *goal;  in damos_new_quota_goal()  local
309 goal = kmalloc(sizeof(*goal), GFP_KERNEL); in damos_new_quota_goal()
310 if (!goal) in damos_new_quota_goal()
312 goal->metric = metric; in damos_new_quota_goal()
313 goal->target_value = target_value; in damos_new_quota_goal()
314 INIT_LIST_HEAD(&goal->list); in damos_new_quota_goal()
315 return goal; in damos_new_quota_goal()
678 struct damos_quota_goal *goal; in damos_nth_quota_goal() local
681 damos_for_each_quota_goal(goal, q) { in damos_nth_quota_goal()
683 return goal; in damos_nth_quota_goal()
1448 * next_input = max(last_input * ((goal - current) / goal + 1), 1)
1458 const unsigned long goal = 10000; in damon_feed_loop_next_input() local
1462 bool over_achieving = score > goal; in damon_feed_loop_next_input()
1464 if (score == goal) in damon_feed_loop_next_input()
1466 if (score >= goal * 2) in damon_feed_loop_next_input()
1470 score_goal_diff = score - goal; in damon_feed_loop_next_input()
1472 score_goal_diff = goal - score; in damon_feed_loop_next_input()
1475 compensation = last_input * score_goal_diff / goal; in damon_feed_loop_next_input()
1477 compensation = last_input / goal * score_goal_diff; in damon_feed_loop_next_input()
1505 static void damos_set_quota_goal_current_value(struct damos_quota_goal *goal) in damos_set_quota_goal_current_value() argument
1509 switch (goal->metric) { in damos_set_quota_goal_current_value()
1511 /* User should already set goal->current_value */ in damos_set_quota_goal_current_value()
1515 goal->current_value = now_psi_total - goal->last_psi_total; in damos_set_quota_goal_current_value()
1516 goal->last_psi_total = now_psi_total; in damos_set_quota_goal_current_value()
1526 struct damos_quota_goal *goal; in damos_quota_score() local
1529 damos_for_each_quota_goal(goal, quota) { in damos_quota_score()
1530 damos_set_quota_goal_current_value(goal); in damos_quota_score()
1532 goal->current_value * 10000 / in damos_quota_score()
1533 goal->target_value); in damos_quota_score()