projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40d18eb
)
mm/oom_kill.c: document oom_lock
author
Michal Hocko
<
[email protected]
>
Fri, 17 Aug 2018 22:49:10 +0000
(15:49 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 17 Aug 2018 23:20:32 +0000
(16:20 -0700)
Add comments describing oom_lock's scope.
Requested-by: David Rientjes <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Michal Hocko <
[email protected]
>
Reviewed-by: Andrew Morton <
[email protected]
>
Cc: David Rientjes <
[email protected]
>
Cc: Tetsuo Handa <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/oom_kill.c
patch
|
blob
|
history
diff --git
a/mm/oom_kill.c
b/mm/oom_kill.c
index cd6520f7553d80a157e0cf15123b312891bfa929..412f43453a68ff5260ec46c6211c9249cf9d9cc6 100644
(file)
--- a/
mm/oom_kill.c
+++ b/
mm/oom_kill.c
@@
-53,6
+53,14
@@
int sysctl_panic_on_oom;
int sysctl_oom_kill_allocating_task;
int sysctl_oom_dump_tasks = 1;
+/*
+ * Serializes oom killer invocations (out_of_memory()) from all contexts to
+ * prevent from over eager oom killing (e.g. when the oom killer is invoked
+ * from different domains).
+ *
+ * oom_killer_disable() relies on this lock to stabilize oom_killer_disabled
+ * and mark_oom_victim
+ */
DEFINE_MUTEX(oom_lock);
#ifdef CONFIG_NUMA