diff options
author | Shaohua Li <shli@fb.com> | 2015-10-15 15:28:29 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-27 09:51:53 +0900 |
commit | 2105f9aec785cbc4679132abb44645bb3c59a93e (patch) | |
tree | 4d805390f031f2758cdf1a9bcb625fa34ca7ca65 /mm | |
parent | 3ae2c7951214fd5926101e817432feabb7f72feb (diff) | |
download | linux-stable-2105f9aec785cbc4679132abb44645bb3c59a93e.tar.gz linux-stable-2105f9aec785cbc4679132abb44645bb3c59a93e.tar.bz2 linux-stable-2105f9aec785cbc4679132abb44645bb3c59a93e.zip |
memcg: convert threshold to bytes
commit 424cdc14138088ada1b0e407a2195b2783c6e5ef upstream.
page_counter_memparse() returns pages for the threshold, while
mem_cgroup_usage() returns bytes for memory usage. Convert the
threshold to bytes.
Fixes: 3e32cb2e0a12b6915 ("memcg: rename cgroup_event to mem_cgroup_event").
Signed-off-by: Shaohua Li <shli@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index a04225d372ba..68dea90334cb 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3677,6 +3677,7 @@ static int __mem_cgroup_usage_register_event(struct mem_cgroup *memcg, ret = page_counter_memparse(args, "-1", &threshold); if (ret) return ret; + threshold <<= PAGE_SHIFT; mutex_lock(&memcg->thresholds_lock); |