Skip to contentSkip to conversation

mm/oom_kill: remove unneeded is_memcg_oom check

PATCH Applied Miaohe Lin 3 participants 3 messages Feb 24, 2022 – Feb 28, 2022

Subsystems (2)
lore
Share & tools
lore

Miaohe Lin

author
#0 lore raw

PATCH 1/1 mm/oom_kill: remove unneeded is_memcg_oom check

oom_cpuset_eligible is always called when !is_memcg_oom. Remove this unnecessary check.

---
 mm/oom_kill.c | 3 ---
 1 file changed, 3 deletions(-)
mm/oom_kill.c +0 -3
index 9fea6d3c1ec7..c70a4330e548 100644
@@ -122,9 +122,6 @@ static bool oom_cpuset_eligible(struct task_struct *start,
 	bool ret = false;
 	const nodemask_t *mask = oc->nodemask;
 
-	if (is_memcg_oom(oc))
-		return true;
-
 	rcu_read_lock();
 	for_each_thread(start, tsk) {
 		if (mask) {
Signature · 1 line
2.23.0
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Miaohe Lin
Quoted 4 lines · Miaohe Lin

oom_cpuset_eligible is always called when !is_memcg_oom. Remove this unnecessary check.

Thanks!

Quoted 20 lines
---
 mm/oom_kill.c | 3 ---
 1 file changed, 3 deletions(-)
mm/oom_kill.c +0 -3
index 9fea6d3c1ec7..c70a4330e548 100644
@@ -122,9 +122,6 @@ static bool oom_cpuset_eligible(struct task_struct *start,
 	bool ret = false;
 	const nodemask_t *mask = oc->nodemask;
 
-	if (is_memcg_oom(oc))
-		return true;
-
 	rcu_read_lock();
 	for_each_thread(start, tsk) {
 		if (mask) {
Signature · 1 line
2.23.0
Signature · 2 lines
Michal Hocko
SUSE Labs