* + mm-oom-remove-unnecessary-goto-in-oom_evaluate_task.patch added to mm-unstable branch
@ 2023-08-14 19:30 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-08-14 19:30 UTC (permalink / raw)
To: mm-commits, wangkefeng.wang, sunnanyong, shakeelb, mhocko,
zhangpeng362, akpm
The patch titled
Subject: mm: oom: remove unnecessary goto in oom_evaluate_task()
has been added to the -mm mm-unstable branch. Its filename is
mm-oom-remove-unnecessary-goto-in-oom_evaluate_task.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-oom-remove-unnecessary-goto-in-oom_evaluate_task.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: ZhangPeng <zhangpeng362@huawei.com>
Subject: mm: oom: remove unnecessary goto in oom_evaluate_task()
Date: Mon, 14 Aug 2023 14:34:27 +0800
Patch series "mm: oom: terminate the oom_evaluate_task() loop early".
This patch series improves the performance of select_bad_process() by
terminating the oom_evaluate_task() loop early (if points == LONG_MAX).
This patch (of 2):
Remove redundant goto statement in oom_evaluate_task() to simplify the
code a bit. No functional modification involved.
Link: https://lkml.kernel.org/r/20230814063428.4111206-2-zhangpeng362@huawei.com
Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Nanyong Sun <sunnanyong@huawei.com>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/oom_kill.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--- a/mm/oom_kill.c~mm-oom-remove-unnecessary-goto-in-oom_evaluate_task
+++ a/mm/oom_kill.c
@@ -335,14 +335,12 @@ static int oom_evaluate_task(struct task
*/
if (oom_task_origin(task)) {
points = LONG_MAX;
- goto select;
+ } else {
+ points = oom_badness(task, oc->totalpages);
+ if (points == LONG_MIN || points < oc->chosen_points)
+ goto next;
}
- points = oom_badness(task, oc->totalpages);
- if (points == LONG_MIN || points < oc->chosen_points)
- goto next;
-
-select:
if (oc->chosen)
put_task_struct(oc->chosen);
get_task_struct(task);
_
Patches currently in -mm which might be from zhangpeng362@huawei.com are
mm-kmsan-use-helper-function-page_size.patch
mm-kmsan-use-helper-macro-offset_in_page.patch
mm-kmsan-use-helper-macros-page_align-and-page_align_down.patch
mm-remove-redundant-k-macro-definition.patch
mm-swapfilec-use-helper-macro-k.patch
mm-swap_statec-use-helper-macro-k.patch
mm-shmemc-use-helper-macro-k.patch
mm-nommuc-use-helper-macro-k.patch
mm-mmapc-use-helper-macro-k.patch
mm-hugetlbc-use-helper-macro-k.patch
mm-page_alloc-remove-unused-parameter-from-reserve_highatomic_pageblock.patch
mm-oom-remove-unnecessary-goto-in-oom_evaluate_task.patch
mm-oom-terminate-the-oom_evaluate_task-loop-early.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-14 19:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14 19:30 + mm-oom-remove-unnecessary-goto-in-oom_evaluate_task.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.