[Devel] [PATCH RHEL7 COMMIT] oom: drop OOM_SCAN_ABORT
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Oct 15 06:53:01 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.8.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.8.6
------>
commit 3bb5625c93235a4fd013b4307a1fd9cc9db4e6a8
Author: Vladimir Davydov <vdavydov at parallels.com>
Date: Thu Oct 15 17:53:01 2015 +0400
oom: drop OOM_SCAN_ABORT
Patchset description: oom enhancements - part 2
- Patches 1-2 prepare memcg for upcoming changes in oom design.
- Patch 3 reworks oom locking design so that the executioner waits for
victim to exit. This is necessary to increase oom kill rate, which is
essential for berserker mode.
- Patch 4 drops unused OOM_SCAN_ABORT
- Patch 5 introduces oom timeout.
https://jira.sw.ru/browse/PSBM-38581
- Patch 6 makes oom fairer when it comes to selecting a victim among
different containers.
https://jira.sw.ru/browse/PSBM-37915
- Patch 7 prepares oom for introducing berserker mode
- Patch 8 resurrects oom berserker mode, which is supposed to cope with
actively forking processes.
https://jira.sw.ru/browse/PSBM-17930
https://jira.sw.ru/browse/PSBM-26973
Changes in v3:
- rework oom_trylock (patch 3)
- select exiting process instead of aborting oom scan so as not to keep
busy-waiting for an exiting process to exit (patches 3, 4)
- cleanup oom timeout handling + fix stuck process trace dumped
multiple times on timeout (patch 5)
- set max_overdraft to ULONG_MAX on selected processes (patch 6)
- rework oom berserker process selection logic (patches 7, 8)
Changes in v2:
- s/time_after/time_after_eq to avoid BUG_ON in oom_trylock (patch 4)
- propagate victim to the context that initiated oom in oom_unlock
(patch 6)
- always set oom_end on releasing oom context (patch 6)
Vladimir Davydov (8):
memcg: add mem_cgroup_get/put helpers
memcg: add lock for protecting memcg->oom_notify list
oom: rework locking design
oom: introduce oom timeout
oom: drop OOM_SCAN_ABORT
oom: rework logic behind memory.oom_guarantee
oom: pass points and overdraft to oom_kill_process
oom: resurrect berserker mode
Reviewed-by: Kirill Tkhai <ktkhai at odin.com>
=========================================
This patch description:
It is not used anymore, neither should it be used with the new locking
design.
Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
include/linux/oom.h | 1 -
mm/memcontrol.c | 6 ------
mm/oom_kill.c | 7 +------
3 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/include/linux/oom.h b/include/linux/oom.h
index f804551..6d4a94f 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -27,7 +27,6 @@ enum oom_constraint {
enum oom_scan_t {
OOM_SCAN_OK, /* scan thread and find its badness */
OOM_SCAN_CONTINUE, /* do not consider thread for oom kill */
- OOM_SCAN_ABORT, /* abort the iteration and return */
OOM_SCAN_SELECT, /* always select this thread first */
};
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 892e5ff..7df0dff 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2001,12 +2001,6 @@ retry:
/* fall through */
case OOM_SCAN_CONTINUE:
continue;
- case OOM_SCAN_ABORT:
- cgroup_iter_end(cgroup, &it);
- mem_cgroup_iter_break(memcg, iter);
- if (chosen)
- put_task_struct(chosen);
- return;
case OOM_SCAN_OK:
break;
};
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 2fab831..914f9f4 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -358,9 +358,6 @@ retry:
/* fall through */
case OOM_SCAN_CONTINUE:
continue;
- case OOM_SCAN_ABORT:
- rcu_read_unlock();
- return ERR_PTR(-1UL);
case OOM_SCAN_OK:
break;
};
@@ -887,11 +884,9 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask,
if (!p) {
dump_header(NULL, gfp_mask, order, NULL, mpol_mask);
panic("Out of memory and no killable processes...\n");
- }
- if (PTR_ERR(p) != -1UL) {
+ } else
oom_kill_process(p, gfp_mask, order, points, totalpages, NULL,
nodemask, "Out of memory");
- }
}
/*
More information about the Devel
mailing list