1*6f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2607ca46eSDavid Howells #ifndef _UAPI__INCLUDE_LINUX_OOM_H 3607ca46eSDavid Howells #define _UAPI__INCLUDE_LINUX_OOM_H 4607ca46eSDavid Howells 5607ca46eSDavid Howells /* 6607ca46eSDavid Howells * /proc/<pid>/oom_score_adj set to OOM_SCORE_ADJ_MIN disables oom killing for 7607ca46eSDavid Howells * pid. 8607ca46eSDavid Howells */ 9607ca46eSDavid Howells #define OOM_SCORE_ADJ_MIN (-1000) 10607ca46eSDavid Howells #define OOM_SCORE_ADJ_MAX 1000 11607ca46eSDavid Howells 12fa0cbbf1SDavid Rientjes /* 13fa0cbbf1SDavid Rientjes * /proc/<pid>/oom_adj set to -17 protects from the oom killer for legacy 14fa0cbbf1SDavid Rientjes * purposes. 15fa0cbbf1SDavid Rientjes */ 16fa0cbbf1SDavid Rientjes #define OOM_DISABLE (-17) 17fa0cbbf1SDavid Rientjes /* inclusive */ 18fa0cbbf1SDavid Rientjes #define OOM_ADJUST_MIN (-16) 19fa0cbbf1SDavid Rientjes #define OOM_ADJUST_MAX 15 20fa0cbbf1SDavid Rientjes 21607ca46eSDavid Howells #endif /* _UAPI__INCLUDE_LINUX_OOM_H */ 22