linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>,
	"lizf@cn.fujitsu.com" <lizf@cn.fujitsu.com>,
	"menage@google.com" <menage@google.com>
Subject: Re: [RFC][PATCH 1/4] cgroup: support per cgroup subsys state ID (CSS ID)
Date: Thu, 15 Jan 2009 15:12:03 +0900	[thread overview]
Message-ID: <20090115151203.e79271c0.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20090112072147.GB27129@balbir.in.ibm.com>

Sorry for delayed reply.


On Mon, 12 Jan 2009 12:51:48 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

> * KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-01-08 18:28:17]:
> > There are several reasons to develop this.
> > 	- Saving space .... For example, memcg's swap_cgroup is array of
> > 	  pointers to cgroup. But it is not necessary to be very fast.
> > 	  By replacing pointers(8bytes per ent) to ID (2byes per ent), we can
> > 	  reduce much amount of memory usage.
> 
> 2 bytes per entry means that we restrict the entries to 2^16-1 for
> number of cgroups, using a pointer introduces no such restriction.
> 2^16-1 seems a reasonable number for now.
> 
yes.


> >  /* bits in struct cgroup_subsys_state flags field */
> > @@ -363,6 +367,11 @@ struct cgroup_subsys {
> >  	int active;
> >  	int disabled;
> >  	int early_init;
> > +	/*
> > +	 * True if this subsys uses ID. ID is not available before cgroup_init()
> > +	 * (not available in early_init time.)
>                                             ^ period should come later
sure.

;
> > +	/*
> > +	 * Hierarchy of CSS ID belongs to.
> > +	 */
> > +	unsigned short  stack[0]; /* Array of Length (depth+1) */
> 
> By maintaining the path up to the root here, is that how we avoid walking
> through cgroups links?
> 
yes. we can check this css is under hierarchy by

   css->stack[root->depth] == root->id.


> > +/**
> >   * idr_replace - replace pointer for given id
> >   * @idp: idr handle
> >   * @ptr: pointer you want associated with the id
> >
> 
> Overall, I've taken a quick look and the patches seem OK.
> 
thx,

-Kame

--
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>

  reply	other threads:[~2009-01-15  6:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-08  9:25 [RFC][PATCH] cgroup and memcg updates 20090108 KAMEZAWA Hiroyuki
2009-01-08  9:28 ` [RFC][PATCH 1/4] cgroup: support per cgroup subsys state ID (CSS ID) KAMEZAWA Hiroyuki
2009-01-09  3:59   ` Li Zefan
2009-01-09  4:24     ` KAMEZAWA Hiroyuki
2009-01-10  0:23   ` Paul Menage
2009-01-10  0:49     ` KAMEZAWA Hiroyuki
2009-01-12  7:21   ` Balbir Singh
2009-01-15  6:12     ` KAMEZAWA Hiroyuki [this message]
2009-01-13  7:40   ` Li Zefan
2009-01-13  9:22     ` KAMEZAWA Hiroyuki
2009-01-08  9:30 ` [RFC][PATCH 2/4] memcg: use CSS ID in memcg KAMEZAWA Hiroyuki
2009-01-12 12:14   ` Balbir Singh
2009-01-15  6:19     ` KAMEZAWA Hiroyuki
2009-01-08  9:32 ` [RFC][PATCH 3/4] memcg: fix OOM KILL under hierarchy KAMEZAWA Hiroyuki
2009-01-13  8:33   ` Li Zefan
2009-01-13  9:25     ` KAMEZAWA Hiroyuki
2009-01-08  9:35 ` [RFC][PATCH 4/4] cgroup-memcg fix frequent EBUSY at rmdir KAMEZAWA Hiroyuki
2009-01-14  2:48   ` Paul Menage
2009-01-14  3:00     ` KAMEZAWA Hiroyuki
2009-01-14  3:05       ` Paul Menage
2009-01-14  3:12         ` KAMEZAWA Hiroyuki
2009-01-20 10:47           ` [RFC][PATCH 4/4] cgroup-memcg fix frequent EBUSY at rmdir v2 KAMEZAWA Hiroyuki
2009-01-21 10:00             ` Paul Menage
2009-01-21 10:32               ` KAMEZAWA Hiroyuki
2009-01-21 10:43                 ` Paul Menage
2009-01-21 10:45                   ` KAMEZAWA Hiroyuki

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=20090115151203.e79271c0.kamezawa.hiroyu@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@google.com \
    --cc=nishimura@mxp.nes.nec.co.jp \
    /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