summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorYe Liu <liuye@kylinos.cn>2026-08-11 11:36:08 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-10-06 17:39:09 -0700
commitabef8c99527a2e8deb41e9b814a920580c49eff5 (patch)
tree97db7136f2426d8835fecd9e6eda724ea9bbde0d /include/linux
parentf1dff3456c9afd90408e77f7edc2ec960e179217 (diff)
mm/oom_kill, proc: replace magic number 1000 with OOM_SCORE_ADJ_MAX
In oom_badness() and proc_oom_score(), the oom_score_adj normalization uses a hardcoded 1000, which is the value of OOM_SCORE_ADJ_MAX defined in include/uapi/linux/oom.h. Other code in the kernel (e.g. fs/proc/base.c oom_adj handling) already uses OOM_SCORE_ADJ_MAX for the same purpose. Replace the magic number with the macro for consistency and readability. No functional change. Link: https://lore.kernel.org/20260811033609.3992348-1-ye.liu@linux.dev Signed-off-by: Ye Liu <liuye@kylinos.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Michal Hocko <mhocko@suse.com> Cc: David Rientjes <rientjes@google.com> Cc: Shakeel Butt <shakeel.butt@linux.dev> Cc: Song Hu <husong@kylinos.cn>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions