Lines Matching full:goal

309 	struct damos_quota_goal *goal;  in damos_new_quota_goal()  local
311 goal = kmalloc(sizeof(*goal), GFP_KERNEL); in damos_new_quota_goal()
312 if (!goal) in damos_new_quota_goal()
314 goal->metric = metric; in damos_new_quota_goal()
315 goal->target_value = target_value; in damos_new_quota_goal()
316 INIT_LIST_HEAD(&goal->list); in damos_new_quota_goal()
317 return goal; in damos_new_quota_goal()
683 struct damos_quota_goal *goal; in damos_nth_quota_goal() local
686 damos_for_each_quota_goal(goal, q) { in damos_nth_quota_goal()
688 return goal; in damos_nth_quota_goal()
1645 * next_input = max(last_input * ((goal - current) / goal + 1), 1)
1655 const unsigned long goal = 10000; in damon_feed_loop_next_input() local
1659 bool over_achieving = score > goal; in damon_feed_loop_next_input()
1661 if (score == goal) in damon_feed_loop_next_input()
1663 if (score >= goal * 2) in damon_feed_loop_next_input()
1667 score_goal_diff = score - goal; in damon_feed_loop_next_input()
1669 score_goal_diff = goal - score; in damon_feed_loop_next_input()
1672 compensation = last_input * score_goal_diff / goal; in damon_feed_loop_next_input()
1674 compensation = last_input / goal * score_goal_diff; in damon_feed_loop_next_input()
1702 static void damos_set_quota_goal_current_value(struct damos_quota_goal *goal) in damos_set_quota_goal_current_value() argument
1706 switch (goal->metric) { in damos_set_quota_goal_current_value()
1708 /* User should already set goal->current_value */ in damos_set_quota_goal_current_value()
1712 goal->current_value = now_psi_total - goal->last_psi_total; in damos_set_quota_goal_current_value()
1713 goal->last_psi_total = now_psi_total; in damos_set_quota_goal_current_value()
1723 struct damos_quota_goal *goal; in damos_quota_score() local
1726 damos_for_each_quota_goal(goal, quota) { in damos_quota_score()
1727 damos_set_quota_goal_current_value(goal); in damos_quota_score()
1729 goal->current_value * 10000 / in damos_quota_score()
1730 goal->target_value); in damos_quota_score()