From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Subject: [PATCH v2 -mm 1/2] memcg: remove unused mem_cgroup->oom_wakeups
Date: Thu, 4 Jun 2015 00:19:53 +0900 [thread overview]
Message-ID: <20150603151953.GF20091@mtj.duckdns.org> (raw)
In-Reply-To: <20150603023824.GA7579-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
Since 4942642080ea ("mm: memcg: handle non-error OOM situations more
gracefully"), nobody uses mem_cgroup->oom_wakeups. Remove it.
While at it, also fold memcg_wakeup_oom() into memcg_oom_recover()
which is its only user. This cleanup was suggested by Michal.
Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
---
Patch updated. I dropped the comment as it's kinda obvious from the
context and the use of __wake_up().
Thanks.
mm/memcontrol.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -287,7 +287,6 @@ struct mem_cgroup {
bool oom_lock;
atomic_t under_oom;
- atomic_t oom_wakeups;
int swappiness;
/* OOM-Killer disable */
@@ -1850,17 +1849,10 @@ static int memcg_oom_wake_function(wait_
return autoremove_wake_function(wait, mode, sync, arg);
}
-static void memcg_wakeup_oom(struct mem_cgroup *memcg)
-{
- atomic_inc(&memcg->oom_wakeups);
- /* for filtering, pass "memcg" as argument. */
- __wake_up(&memcg_oom_waitq, TASK_NORMAL, 0, memcg);
-}
-
static void memcg_oom_recover(struct mem_cgroup *memcg)
{
if (memcg && atomic_read(&memcg->under_oom))
- memcg_wakeup_oom(memcg);
+ __wake_up(&memcg_oom_waitq, TASK_NORMAL, 0, memcg);
}
static void mem_cgroup_oom(struct mem_cgroup *memcg, gfp_t mask, int order)
WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj@kernel.org>
To: Johannes Weiner <hannes@cmpxchg.org>, Michal Hocko <mhocko@suse.cz>
Cc: cgroups@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH v2 -mm 1/2] memcg: remove unused mem_cgroup->oom_wakeups
Date: Thu, 4 Jun 2015 00:19:53 +0900 [thread overview]
Message-ID: <20150603151953.GF20091@mtj.duckdns.org> (raw)
In-Reply-To: <20150603023824.GA7579@mtj.duckdns.org>
Since 4942642080ea ("mm: memcg: handle non-error OOM situations more
gracefully"), nobody uses mem_cgroup->oom_wakeups. Remove it.
While at it, also fold memcg_wakeup_oom() into memcg_oom_recover()
which is its only user. This cleanup was suggested by Michal.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Michal Hocko <mhocko@suse.cz>
---
Patch updated. I dropped the comment as it's kinda obvious from the
context and the use of __wake_up().
Thanks.
mm/memcontrol.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -287,7 +287,6 @@ struct mem_cgroup {
bool oom_lock;
atomic_t under_oom;
- atomic_t oom_wakeups;
int swappiness;
/* OOM-Killer disable */
@@ -1850,17 +1849,10 @@ static int memcg_oom_wake_function(wait_
return autoremove_wake_function(wait, mode, sync, arg);
}
-static void memcg_wakeup_oom(struct mem_cgroup *memcg)
-{
- atomic_inc(&memcg->oom_wakeups);
- /* for filtering, pass "memcg" as argument. */
- __wake_up(&memcg_oom_waitq, TASK_NORMAL, 0, memcg);
-}
-
static void memcg_oom_recover(struct mem_cgroup *memcg)
{
if (memcg && atomic_read(&memcg->under_oom))
- memcg_wakeup_oom(memcg);
+ __wake_up(&memcg_oom_waitq, TASK_NORMAL, 0, memcg);
}
static void mem_cgroup_oom(struct mem_cgroup *memcg, gfp_t mask, int order)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-06-03 15:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 2:38 [PATCH -mm 1/2] memcg: remove unused mem_cgroup->oom_wakeups Tejun Heo
2015-06-03 2:38 ` Tejun Heo
[not found] ` <20150603023824.GA7579-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-06-03 2:38 ` [PATCH -mm 2/2] memcg: convert mem_cgroup->under_oom from atomic_t to int Tejun Heo
2015-06-03 2:38 ` Tejun Heo
2015-06-03 13:55 ` Michal Hocko
2015-06-03 15:21 ` [PATCH v2 " Tejun Heo
2015-06-03 20:32 ` Michal Hocko
2015-06-03 13:48 ` [PATCH -mm 1/2] memcg: remove unused mem_cgroup->oom_wakeups Michal Hocko
2015-06-03 13:48 ` Michal Hocko
2015-06-03 13:56 ` Michal Hocko
2015-06-03 15:19 ` Tejun Heo [this message]
2015-06-03 15:19 ` [PATCH v2 " Tejun Heo
2015-06-03 20:31 ` 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=20150603151953.GF20091@mtj.duckdns.org \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=mhocko-AlSwsSmVLrQ@public.gmane.org \
/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 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.