Source: boinc Severity: normal Tags: patch Hi, we would like to get rid of oom_adj from the kernel which has been depracated for quite some time. Attached you can find the patch to handle this - see the patch description for more information.
-- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.3.0-rc7 (SMP w/2 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) -- Michal Hocko
From: Michal Hocko <msts...@gmail.com> Subject: use oom_score_adj rather than deprecated oom_adj /proc/<pid>/oom_adj is on the way out from the kernel and all users are supposed to use oom_score_adj instead. The current BOINC_OOM_ADJ is using OOM_ADJUST_MAX which corresponds to OOM_SCORE_ADJ_MAX. Signed-off-by: Michal Hocko <msts...@gmail.com> Index: boinc-7.6.12+dfsg/debian/boinc-client.init =================================================================== --- boinc-7.6.12+dfsg.orig/debian/boinc-client.init +++ boinc-7.6.12+dfsg/debian/boinc-client.init @@ -29,6 +29,7 @@ BOINC_USER=boinc BOINC_DIR=/var/lib/boinc-client BOINC_CLIENT=/usr/bin/boinc BOINC_OOM_ADJ=15 +BOINC_OOM_SCORE_ADJ=1000 #VALGRIND_OPTIONS="-v --log-file=/tmp/valgrind_boinc.log " VALGRIND_OPTIONS="" @@ -206,6 +207,10 @@ schedule() fi fi for BPID in ${pid} ${children}; do + if [ -w /proc/${BPID}/oom_score_adj ]; then + echo ${BOINC_OOM_SCORE_ADJ} > /proc/${BPID}/oom_score_adj 2>/dev/null || true + fi + # Fallback to old oom_adj if oom_score_adj doesn't exist if [ -w /proc/${BPID}/oom_adj ]; then echo ${BOINC_OOM_ADJ} > /proc/${BPID}/oom_adj 2>/dev/null || true else