linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Greg Thelen <gthelen@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	containers@lists.osdl.org, linux-fsdevel@vger.kernel.org,
	Andrea Righi <arighi@develer.com>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	Minchan Kim <minchan.kim@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Ciju Rajan K <ciju@linux.vnet.ibm.com>,
	David Rientjes <rientjes@google.com>,
	Wu Fengguang <fengguang.wu@intel.com>,
	Vivek Goyal <vgoyal@redhat.com>,
	Dave Chinner <david@fromorbit.com>,
	Greg Thelen <gthelen@google.com>
Subject: [RFC][PATCH v7 09/14] cgroup: move CSS_ID_MAX to cgroup.h
Date: Fri, 13 May 2011 01:47:48 -0700	[thread overview]
Message-ID: <1305276473-14780-10-git-send-email-gthelen@google.com> (raw)
In-Reply-To: <1305276473-14780-1-git-send-email-gthelen@google.com>

This allows users of css_id() to know the largest possible css_id value.
This knowledge can be used to build per-cgroup bitmaps.

Signed-off-by: Greg Thelen <gthelen@google.com>
---
 include/linux/cgroup.h |    1 +
 kernel/cgroup.c        |    1 -
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ab4ac0c..5eb6543 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -624,6 +624,7 @@ bool css_is_ancestor(struct cgroup_subsys_state *cg,
 		     const struct cgroup_subsys_state *root);
 
 /* Get id and depth of css */
+#define CSS_ID_MAX	(65535)
 unsigned short css_id(struct cgroup_subsys_state *css);
 unsigned short css_depth(struct cgroup_subsys_state *css);
 struct cgroup_subsys_state *cgroup_css_from_dir(struct file *f, int id);
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 2731d11..ab7e7a7 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -129,7 +129,6 @@ static struct cgroupfs_root rootnode;
  * CSS ID -- ID per subsys's Cgroup Subsys State(CSS). used only when
  * cgroup_subsys->use_id != 0.
  */
-#define CSS_ID_MAX	(65535)
 struct css_id {
 	/*
 	 * The css to which this ID points. This pointer is set to valid value
-- 
1.7.3.1

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2011-05-13  8:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-13  8:47 [RFC][PATCH v7 00/14] memcg: per cgroup dirty page accounting Greg Thelen
2011-05-13  8:47 ` [RFC][PATCH v7 01/14] memcg: document cgroup dirty memory interfaces Greg Thelen
2011-05-13  8:47 ` [RFC][PATCH v7 02/14] memcg: add page_cgroup flags for dirty page tracking Greg Thelen
2011-05-13  8:47 ` [RFC][PATCH v7 03/14] memcg: add mem_cgroup_mark_inode_dirty() Greg Thelen
2011-05-13  9:31   ` KAMEZAWA Hiroyuki
2011-05-13  8:47 ` [RFC][PATCH v7 04/14] memcg: add dirty page accounting infrastructure Greg Thelen
2011-05-13  9:33   ` KAMEZAWA Hiroyuki
2011-05-13  8:47 ` [RFC][PATCH v7 05/14] memcg: add kernel calls for memcg dirty page stats Greg Thelen
2011-05-13  8:47 ` [RFC][PATCH v7 06/14] memcg: add dirty limits to mem_cgroup Greg Thelen
2011-05-13  8:47 ` [RFC][PATCH v7 07/14] memcg: add cgroupfs interface to memcg dirty limits Greg Thelen
2011-05-13  8:47 ` [RFC][PATCH v7 08/14] writeback: add memcg fields to writeback_control Greg Thelen
2011-05-13  9:41   ` KAMEZAWA Hiroyuki
2011-05-15 19:53     ` Greg Thelen
2011-05-13  8:47 ` Greg Thelen [this message]
2011-05-13  9:51   ` [RFC][PATCH v7 09/14] cgroup: move CSS_ID_MAX to cgroup.h KAMEZAWA Hiroyuki
2011-05-15 19:53     ` Greg Thelen
2011-05-13  8:47 ` [RFC][PATCH v7 10/14] memcg: dirty page accounting support routines Greg Thelen
2011-05-13  9:56   ` KAMEZAWA Hiroyuki
2011-05-15 19:56     ` Greg Thelen
2011-05-16  5:58       ` KAMEZAWA Hiroyuki
2011-05-13  8:47 ` [RFC][PATCH v7 11/14] memcg: create support routines for writeback Greg Thelen
2011-05-13 10:04   ` KAMEZAWA Hiroyuki
2011-05-15 19:56     ` Greg Thelen
2011-05-13  8:47 ` [RFC][PATCH v7 12/14] memcg: create support routines for page-writeback Greg Thelen
2011-05-13  8:47 ` [RFC][PATCH v7 13/14] writeback: make background writeback cgroup aware Greg Thelen
2011-05-13 10:14   ` KAMEZAWA Hiroyuki
2011-05-13  8:47 ` [RFC][PATCH v7 14/14] memcg: check memcg dirty limits in page writeback Greg Thelen
2011-05-13  9:25 ` [RFC][PATCH v7 00/14] memcg: per cgroup dirty page accounting KAMEZAWA Hiroyuki
2011-05-14  0:54   ` Greg Thelen

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=1305276473-14780-10-git-send-email-gthelen@google.com \
    --to=gthelen@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=arighi@develer.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=ciju@linux.vnet.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=david@fromorbit.com \
    --cc=fengguang.wu@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=nishimura@mxp.nes.nec.co.jp \
    --cc=rientjes@google.com \
    --cc=vgoyal@redhat.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