[3.19.y-ckt stable] Patch "memcg: convert threshold to bytes" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Thu Nov 12 23:14:14 UTC 2015


This is a note to let you know that I have just added a patch titled

    memcg: convert threshold to bytes

to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue

This patch is scheduled to be released in version 3.19.8-ckt10.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 511a29e14001bfb346459aa87811fc57d8074bc2 Mon Sep 17 00:00:00 2001
From: Shaohua Li <shli at fb.com>
Date: Thu, 15 Oct 2015 15:28:29 -0700
Subject: [PATCH 049/120] 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 at fb.com>
Cc: Johannes Weiner <hannes at cmpxchg.org>
Acked-by: Michal Hocko <mhocko at suse.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 mm/memcontrol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2f6893c..28253e5 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3904,6 +3904,7 @@ static int __mem_cgroup_usage_register_event(struct mem_cgroup *memcg,
 	ret = page_counter_memparse(args, &threshold);
 	if (ret)
 		return ret;
+	threshold <<= PAGE_SHIFT;

 	mutex_lock(&memcg->thresholds_lock);

--
1.9.1





More information about the kernel-team mailing list