From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wanpeng Li Subject: [PATCH v2] mm/memcg: mem_cgroup_resize_xxx_limit can guarantee memcg->res.limit <= memcg->memsw.limit Date: Fri, 6 Jul 2012 11:24:15 +0800 Message-ID: <1341545055-5830-1-git-send-email-liwp.linux@gmail.com> Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=r04RqSlgWX97CJFkBgtRPr06dCtpWXxydAZZTIDn7kI=; b=foj+ysW6m+yqh/BqCfM72ei5hcE3SnRjeq+XnzWbTotn5iwX8d/3NsH56k1wb4oHVN 7oV5/bRub075Od42IfrePg3ftbRco/UKnBrhNBdBX9kdAT1q5o7iyp9voPU3CI9ZzL+x WmQnhNtggjrTrmrOG/zh0Hh289l6+jyjuX4A8vjLLMCZ1QpNeZbQAP+UvInEYgvZ2a3d U86RrT9Lwur/4WK0/aXKu5A7NVyGGlaOi7ZAiVhF0k7PnHO64yBAUjXQnCFnmhzWhrKo bhEfW5qztabkUTP9jjS0zFHOVcqUczEW8olCcEyNPyZbYEfcYO0SUyqRdI85Pixc6koo sP0Q== Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrew Morton Cc: Johannes Weiner , Michal Hocko , KAMEZAWA Hiroyuki , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Wanpeng Li From: Wanpeng Li Changlog: V2: * correct title Signed-off-by: Wanpeng Li --- mm/memcontrol.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 4b64fe0..a501660 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3418,7 +3418,7 @@ static int mem_cgroup_resize_limit(struct mem_cgroup *memcg, /* * Rather than hide all in some function, I do this in * open coded manner. You see what this really does. - * We have to guarantee memcg->res.limit < memcg->memsw.limit. + * We have to guarantee memcg->res.limit <= memcg->memsw.limit. */ mutex_lock(&set_limit_mutex); memswlimit = res_counter_read_u64(&memcg->memsw, RES_LIMIT); @@ -3479,7 +3479,7 @@ static int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg, /* * Rather than hide all in some function, I do this in * open coded manner. You see what this really does. - * We have to guarantee memcg->res.limit < memcg->memsw.limit. + * We have to guarantee memcg->res.limit <= memcg->memsw.limit. */ mutex_lock(&set_limit_mutex); memlimit = res_counter_read_u64(&memcg->res, RES_LIMIT); -- 1.7.5.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx126.postini.com [74.125.245.126]) by kanga.kvack.org (Postfix) with SMTP id 481B86B0070 for ; Thu, 5 Jul 2012 23:24:42 -0400 (EDT) Received: by ghrr18 with SMTP id r18so10042451ghr.14 for ; Thu, 05 Jul 2012 20:24:41 -0700 (PDT) From: Wanpeng Li Subject: [PATCH v2] mm/memcg: mem_cgroup_resize_xxx_limit can guarantee memcg->res.limit <= memcg->memsw.limit Date: Fri, 6 Jul 2012 11:24:15 +0800 Message-Id: <1341545055-5830-1-git-send-email-liwp.linux@gmail.com> Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Johannes Weiner , Michal Hocko , KAMEZAWA Hiroyuki , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li From: Wanpeng Li Changlog: V2: * correct title Signed-off-by: Wanpeng Li --- mm/memcontrol.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 4b64fe0..a501660 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3418,7 +3418,7 @@ static int mem_cgroup_resize_limit(struct mem_cgroup *memcg, /* * Rather than hide all in some function, I do this in * open coded manner. You see what this really does. - * We have to guarantee memcg->res.limit < memcg->memsw.limit. + * We have to guarantee memcg->res.limit <= memcg->memsw.limit. */ mutex_lock(&set_limit_mutex); memswlimit = res_counter_read_u64(&memcg->memsw, RES_LIMIT); @@ -3479,7 +3479,7 @@ static int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg, /* * Rather than hide all in some function, I do this in * open coded manner. You see what this really does. - * We have to guarantee memcg->res.limit < memcg->memsw.limit. + * We have to guarantee memcg->res.limit <= memcg->memsw.limit. */ mutex_lock(&set_limit_mutex); memlimit = res_counter_read_u64(&memcg->res, RES_LIMIT); -- 1.7.5.4 -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752594Ab2GFDYn (ORCPT ); Thu, 5 Jul 2012 23:24:43 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:56926 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768Ab2GFDYm (ORCPT ); Thu, 5 Jul 2012 23:24:42 -0400 From: Wanpeng Li To: Andrew Morton Cc: Johannes Weiner , Michal Hocko , KAMEZAWA Hiroyuki , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li Subject: [PATCH v2] mm/memcg: mem_cgroup_resize_xxx_limit can guarantee memcg->res.limit <= memcg->memsw.limit Date: Fri, 6 Jul 2012 11:24:15 +0800 Message-Id: <1341545055-5830-1-git-send-email-liwp.linux@gmail.com> X-Mailer: git-send-email 1.7.5.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wanpeng Li Changlog: V2: * correct title Signed-off-by: Wanpeng Li --- mm/memcontrol.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 4b64fe0..a501660 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3418,7 +3418,7 @@ static int mem_cgroup_resize_limit(struct mem_cgroup *memcg, /* * Rather than hide all in some function, I do this in * open coded manner. You see what this really does. - * We have to guarantee memcg->res.limit < memcg->memsw.limit. + * We have to guarantee memcg->res.limit <= memcg->memsw.limit. */ mutex_lock(&set_limit_mutex); memswlimit = res_counter_read_u64(&memcg->memsw, RES_LIMIT); @@ -3479,7 +3479,7 @@ static int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg, /* * Rather than hide all in some function, I do this in * open coded manner. You see what this really does. - * We have to guarantee memcg->res.limit < memcg->memsw.limit. + * We have to guarantee memcg->res.limit <= memcg->memsw.limit. */ mutex_lock(&set_limit_mutex); memlimit = res_counter_read_u64(&memcg->res, RES_LIMIT); -- 1.7.5.4