[nacked] mm-oom_kill-break-evaluation-when-a-task-has-been-selected.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: mm/oom_kill: break evaluation when a task has been selected
has been removed from the -mm tree.  Its filename was
     mm-oom_kill-break-evaluation-when-a-task-has-been-selected.patch

This patch was dropped because it was nacked

------------------------------------------------------
From: Zhaoyu Liu <zackary.liu.pro@xxxxxxxxx>
Subject: mm/oom_kill: break evaluation when a task has been selected
Date: Sat, 14 May 2022 15:52:28 +0800

oom points no longer need to be calculated if a task is oom_task_origin(),
so return 1 to stop the oom_evaluate_task().

The victim was marked in the last oom, and now it has entered the oom
again, which means that the system still has no deprecated memory
available.  In order to ensure that the system can return to normal as
soon as possible, killing the original task immediately should be a
good choice, and the role of this patch is to end oom_evaluate_task and
return true as soon as the original task is found.  Maybe this patch is
not the optimal solution, it has a trade-off.

Link: https://lkml.kernel.org/r/20220514075223.GA11384@pc
Signed-off-by: Zhaoyu Liu <zackary.liu.pro@xxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/oom_kill.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/mm/oom_kill.c~mm-oom_kill-break-evaluation-when-a-task-has-been-selected
+++ a/mm/oom_kill.c
@@ -308,7 +308,7 @@ static enum oom_constraint constrained_a
 static int oom_evaluate_task(struct task_struct *task, void *arg)
 {
 	struct oom_control *oc = arg;
-	long points;
+	long points = 0;
 
 	if (oom_unkillable_task(task))
 		goto next;
@@ -349,7 +349,7 @@ select:
 	oc->chosen = task;
 	oc->chosen_points = points;
 next:
-	return 0;
+	return points == LONG_MAX;
 abort:
 	if (oc->chosen)
 		put_task_struct(oc->chosen);
_

Patches currently in -mm which might be from zackary.liu.pro@xxxxxxxxx are





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux