diff mbox series

mm: oom: Remove thread group leader check in oom_evaluate_task().

Message ID 1560853257-14934-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp (mailing list archive)
State New, archived
Headers show
Series mm: oom: Remove thread group leader check in oom_evaluate_task(). | expand

Commit Message

Tetsuo Handa June 18, 2019, 10:20 a.m. UTC
Since mem_cgroup_scan_tasks() uses CSS_TASK_ITER_PROCS, only thread group
leaders will be scanned (unless dying leaders with live threads). Thus,
commit d49ad9355420c743 ("mm, oom: prefer thread group leaders for display
purposes") makes little sense.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: David Rientjes <rientjes@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Greg Thelen <gthelen@google.com>
---
 mm/oom_kill.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Michal Hocko June 18, 2019, 12:14 p.m. UTC | #1
On Tue 18-06-19 19:20:57, Tetsuo Handa wrote:
> Since mem_cgroup_scan_tasks() uses CSS_TASK_ITER_PROCS, only thread group
> leaders will be scanned (unless dying leaders with live threads). Thus,
> commit d49ad9355420c743 ("mm, oom: prefer thread group leaders for display
> purposes") makes little sense.

This can be folded into mm-memcontrol-use-css_task_iter_procs-at-mem_cgroup_scan_tasks.patch
right?

> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@suse.cz>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Greg Thelen <gthelen@google.com>
> ---
>  mm/oom_kill.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/mm/oom_kill.c b/mm/oom_kill.c
> index 32abc7a..09a5116 100644
> --- a/mm/oom_kill.c
> +++ b/mm/oom_kill.c
> @@ -348,9 +348,6 @@ static int oom_evaluate_task(struct task_struct *task, void *arg)
>  	if (!points || points < oc->chosen_points)
>  		goto next;
>  
> -	/* Prefer thread group leaders for display purposes */
> -	if (points == oc->chosen_points && thread_group_leader(oc->chosen))
> -		goto next;
>  select:
>  	if (oc->chosen)
>  		put_task_struct(oc->chosen);
> -- 
> 1.8.3.1
Tetsuo Handa June 18, 2019, 1:23 p.m. UTC | #2
On 2019/06/18 21:14, Michal Hocko wrote:
> On Tue 18-06-19 19:20:57, Tetsuo Handa wrote:
>> Since mem_cgroup_scan_tasks() uses CSS_TASK_ITER_PROCS, only thread group
>> leaders will be scanned (unless dying leaders with live threads). Thus,
>> commit d49ad9355420c743 ("mm, oom: prefer thread group leaders for display
>> purposes") makes little sense.
> 
> This can be folded into mm-memcontrol-use-css_task_iter_procs-at-mem_cgroup_scan_tasks.patch
> right?

Yes, if we want to do so.
diff mbox series

Patch

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 32abc7a..09a5116 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -348,9 +348,6 @@  static int oom_evaluate_task(struct task_struct *task, void *arg)
 	if (!points || points < oc->chosen_points)
 		goto next;
 
-	/* Prefer thread group leaders for display purposes */
-	if (points == oc->chosen_points && thread_group_leader(oc->chosen))
-		goto next;
 select:
 	if (oc->chosen)
 		put_task_struct(oc->chosen);