diff options
author | Michal Hocko <mhocko@suse.com> | 2016-07-29 00:44:40 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-29 01:07:41 +0200 |
commit | 1d5f0acbc675506f98a2c42a40a35f5afb0d1c21 (patch) | |
tree | 6743599114e494382c9d697ccb584e9c2bfda604 /mm/oom_kill.c | |
parent | proc, oom: drop bogus sighand lock (diff) | |
download | linux-1d5f0acbc675506f98a2c42a40a35f5afb0d1c21.tar.xz linux-1d5f0acbc675506f98a2c42a40a35f5afb0d1c21.zip |
proc, oom_adj: extract oom_score_adj setting into a helper
Currently we have two proc interfaces to set oom_score_adj. The legacy
/proc/<pid>/oom_adj and /proc/<pid>/oom_score_adj which both have their
specific handlers. Big part of the logic is duplicated so extract the
common code into __set_oom_adj helper. Legacy knob still expects some
details slightly different so make sure those are handled same way - e.g.
the legacy mode ignores oom_score_adj_min and it warns about the usage.
This patch shouldn't introduce any functional changes.
Link: http://lkml.kernel.org/r/1466426628-15074-4-git-send-email-mhocko@kernel.org
Signed-off-by: Michal Hocko <mhocko@suse.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/oom_kill.c')
0 files changed, 0 insertions, 0 deletions