From: ufo19890607@gmail.com
To: akpm@linux-foundation.org, mhocko@suse.com, rientjes@google.com,
kirill.shutemov@linux.intel.com, aarcange@redhat.com,
penguin-kernel@i-love.sakura.ne.jp, guro@fb.com,
yang.s@alibaba-inc.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
yuzhoujian@didichuxing.com
Subject: [PATCH v10 1/2] Move enum oom_constraint in oom.h
Date: Sat, 23 Jun 2018 22:12:50 +0800 [thread overview]
Message-ID: <1529763171-29240-1-git-send-email-ufo19890607@gmail.com> (raw)
From: yuzhoujian <yuzhoujian@didichuxing.com>
This patch will make some preparation for the follow-up patch: Refactor
part of the oom report in dump_header. It puts enum oom_constraint in
oom.h.
Signed-off-by: yuzhoujian <yuzhoujian@didichuxing.com>
---
include/linux/memcontrol.h | 1 +
include/linux/oom.h | 7 +++++++
mm/oom_kill.c | 7 -------
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 6c6fb116e925..513b74b3115b 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -28,6 +28,7 @@
#include <linux/eventfd.h>
#include <linux/mm.h>
#include <linux/vmstat.h>
+#include <linux/oom.h>
#include <linux/writeback.h>
#include <linux/page-flags.h>
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 6adac113e96d..40cc561f8557 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -15,6 +15,13 @@ struct notifier_block;
struct mem_cgroup;
struct task_struct;
+enum oom_constraint {
+ CONSTRAINT_NONE,
+ CONSTRAINT_CPUSET,
+ CONSTRAINT_MEMORY_POLICY,
+ CONSTRAINT_MEMCG,
+};
+
/*
* Details of the page allocation that triggered the oom killer that are used to
* determine what should be killed.
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 84081e77bc51..1045c5bc7c37 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -237,13 +237,6 @@ unsigned long oom_badness(struct task_struct *p, struct mem_cgroup *memcg,
return points > 0 ? points : 1;
}
-enum oom_constraint {
- CONSTRAINT_NONE,
- CONSTRAINT_CPUSET,
- CONSTRAINT_MEMORY_POLICY,
- CONSTRAINT_MEMCG,
-};
-
/*
* Determine the type of allocation constraint.
*/
--
2.14.1
next reply other threads:[~2018-06-23 14:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-23 14:12 ufo19890607 [this message]
2018-06-23 14:12 ` [PATCH v10 2/2] Refactor part of the oom report in dump_header ufo19890607
2018-06-28 2:10 ` Andrew Morton
2018-06-28 10:30 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1529763171-29240-1-git-send-email-ufo19890607@gmail.com \
--to=ufo19890607@gmail.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=rientjes@google.com \
--cc=yang.s@alibaba-inc.com \
--cc=yuzhoujian@didichuxing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).