Skip to content

Commit

Permalink
-p: set oom_score_adj to -100 instead of -1000
Browse files Browse the repository at this point in the history
Fixes #170
  • Loading branch information
rfjakob committed Mar 5, 2020
1 parent 7fa6040 commit a4021ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ accept

Changelog
---------
* vNEXT, in progress
* `-p`: set oom_score_adj to `-100` instead of `-1000`
([#170](https://github.com/rfjakob/earlyoom/issues/170))

* v1.4, 2020-03-01
* Make victim selection logic 50% faster by lazy-loading process attributes
* Log the user id `uid` of killed processes in addition to pid and name
Expand Down
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ int main(int argc, char* argv[])
" -r INTERVAL memory report interval in seconds (default 1), set\n"
" to 0 to disable completely\n"
" -p set niceness of earlyoom to -20 and oom_score_adj to\n"
" -1000\n"
" -100\n"
" --prefer REGEX prefer to kill processes matching REGEX\n"
" --avoid REGEX avoid killing processes matching REGEX\n"
" --dry-run dry run (do not kill any processes)\n"
Expand Down Expand Up @@ -244,7 +244,7 @@ int main(int argc, char* argv[])
warn("Could not set priority: %s. Continuing anyway\n", strerror(errno));
fail = 1;
}
int ret = set_oom_score_adj(-1000);
int ret = set_oom_score_adj(-100);
if (ret != 0) {
warn("Could not set oom_score_adj: %s. Continuing anyway\n", strerror(ret));
fail = 1;
Expand Down

0 comments on commit a4021ae

Please sign in to comment.