This commit is contained in:
Alexey Avramov 2019-08-03 16:07:49 +09:00
parent f1bad6a289
commit 121a67917a
2 changed files with 9 additions and 6 deletions

View File

@ -6,7 +6,9 @@ sudo: required
script:
- sudo make install
- /bin/sleep 60 &
- nohang -h
- /usr/b
- nohang -v
- nohang -cc /etc/nohang/nohang.conf
- nohang -cc test.conf
@ -14,6 +16,7 @@ script:
- sudo nohang -p
- oom-sort -h
- oom-sort
- sudo bash -c "nohang & tail /dev/zero & sleep 30 && pkill python3"
- sudo bash -c "nohang -c test.conf & tail /dev/zero & sleep 30 && pkill python3"
- sudo bash -c "nohang & tail /dev/zero & sleep 20 && pkill python3"
- sudo bash -c "nohang -c test.conf & tail /dev/zero & sleep 20 && pkill python3"
- sudo cat /var/log/nohang.log
- sudo make uninstall

View File

@ -201,7 +201,7 @@ ignore_positive_oom_score_adj = True
5.2. Matching CGroup_v1-line with RE patterns
@BADNESS_ADJ_RE_CGROUP_V1 -50 /// ^/system\.slice/
@BADNESS_ADJ_RE_CGROUP_V1 5 /// ^/system\.slice/
@BADNESS_ADJ_RE_CGROUP_V1 50 /// /foo\.service$
@ -213,7 +213,7 @@ ignore_positive_oom_score_adj = True
5.4. Matching eUIDs with RE patterns
@BADNESS_ADJ_RE_UID -10 /// ^0$
@BADNESS_ADJ_RE_UID 50 /// ^0$
5.5. Matching realpath with RE patterns
@ -224,7 +224,7 @@ ignore_positive_oom_score_adj = True
A good option that allows fine adjustment.
Prefer chromium tabs and electron-based apps
@BADNESS_ADJ_RE_CMDLINE 200 /// --type=renderer
@BADNESS_ADJ_RE_CMDLINE 2000 /// ^/bin/sleep
Prefer firefox tabs (Web Content and WebExtensions)
@BADNESS_ADJ_RE_CMDLINE 100 /// -appomni
@ -248,7 +248,7 @@ ignore_positive_oom_score_adj = True
Syntax:
KEY REGEXP SEPARATOR COMMAND
@SOFT_ACTION_RE_NAME ^tail$ /// kill -SEGV $PID
@SOFT_ACTION_RE_NAME ^tail$ /// kill -SEGV $PID
@SOFT_ACTION_RE_NAME ^bash$ /// kill -9 $PID
@SOFT_ACTION_RE_CGROUP_V1 ^/system\.slice/ /// systemctl restart $SERVICE