resourced-lmk-governor needs to know the number of killing cycle.
This is because, the governor should know whether
memory thrasing happens or not. If lowmem state is not recovered during the
threshold cycle, then the governor skips working set size calculation and
does not give benefit to apps with effcient memory usage.
Change-Id: I4ba581d10b967665ae3155205cba9b30b0e3fa6b
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
GArray *task_info_proc_array,
unsigned long totalram_kb);
int (*get_kill_candidates_post)(GArray *candidates);
- int (*get_kill_candidates_post_with_wss)(GArray *candidates);
+ int (*get_kill_candidates_post_with_wss)(GArray *candidates, int lmk_try_count);
int (*get_kill_candidates_post_with_foreground)(GArray *candidates,
enum syscommon_resourced_memory_lmk_oom_level oom_level);
} syscommon_plugin_backend_resourced_memory_lmk_funcs;
according to working set size rule
* @param[in] candidates is a GArray to return kill candidates, it is already
sorted by get_kill_candidates
+ * @param[in] lmk_try_count is the number of LMK in a event
* @return @c zero on success,
* otherwise a negative error value
*/
int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post_with_wss(
- GArray *candidates);
+ GArray *candidates, int lmk_try_count);
/**
* @brief Reorder candidates list sorted first by get_kill_candidates fuction
EXPORT
int syscommon_plugin_resourced_memory_lmk_get_kill_candidates_post_with_wss(
- GArray *candidates)
+ GArray *candidates, int lmk_try_count)
{
int ret = 0;
return -ENOTSUP;
}
- return funcs->get_kill_candidates_post_with_wss(candidates);
+ return funcs->get_kill_candidates_post_with_wss(candidates, lmk_try_count);
}
EXPORT