mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
mm, oom: change type of oom_score_adj to short
The maximum oom_score_adj is 1000 and the minimum oom_score_adj is -1000, so this range can be represented by the signed short type with no functional change. The extra space this frees up in struct signal_struct will be used for per-thread oom kill flags in the next patch. Signed-off-by: David Rientjes <rientjes@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Cc: Anton Vorontsov <anton.vorontsov@linaro.org> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
fa26437517
commit
a9c58b907d
9 changed files with 31 additions and 31 deletions
|
@ -29,8 +29,8 @@ enum oom_scan_t {
|
|||
OOM_SCAN_SELECT, /* always select this thread first */
|
||||
};
|
||||
|
||||
extern void compare_swap_oom_score_adj(int old_val, int new_val);
|
||||
extern int test_set_oom_score_adj(int new_val);
|
||||
extern void compare_swap_oom_score_adj(short old_val, short new_val);
|
||||
extern short test_set_oom_score_adj(short new_val);
|
||||
|
||||
extern unsigned long oom_badness(struct task_struct *p,
|
||||
struct mem_cgroup *memcg, const nodemask_t *nodemask,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue