From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Ryo Tsuruta <ryov@valinux.co.jp>
Cc: kamezawa.hiroyu@jp.fujitsu.com, linux-kernel@vger.kernel.org,
dm-devel@redhat.com, containers@lists.linux-foundation.org,
virtualization@lists.linux-foundation.org,
xen-devel@lists.xensource.com, agk@redhat.com
Subject: Re: [PATCH 3/9] blkio-cgroup-v9: The new page_cgroup framework
Date: Wed, 22 Jul 2009 14:07:22 +0530 [thread overview]
Message-ID: <20090722083722.GI24157@balbir.in.ibm.com> (raw)
In-Reply-To: <20090722.172843.193696974.ryov@valinux.co.jp>
* Ryo Tsuruta <ryov@valinux.co.jp> [2009-07-22 17:28:43]:
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> > > > > Index: linux-2.6.31-rc3/include/linux/page_cgroup.h
> > > > > ===================================================================
> > > > > --- linux-2.6.31-rc3.orig/include/linux/page_cgroup.h
> > > > > +++ linux-2.6.31-rc3/include/linux/page_cgroup.h
> > > > > @@ -1,7 +1,7 @@
> > > > > #ifndef __LINUX_PAGE_CGROUP_H
> > > > > #define __LINUX_PAGE_CGROUP_H
> > > > >
> > > > > -#ifdef CONFIG_CGROUP_MEM_RES_CTLR
> > > > > +#ifdef CONFIG_CGROUP_PAGE
> > > > > #include <linux/bit_spinlock.h>
> > > > > /*
> > > > > * Page Cgroup can be considered as an extended mem_map.
> > > > > @@ -12,9 +12,11 @@
> > > > > */
> > > > > struct page_cgroup {
> > > > > unsigned long flags;
> > > > > - struct mem_cgroup *mem_cgroup;
> > > > > struct page *page;
> > > > > +#ifdef CONFIG_CGROUP_MEM_RES_CTLR
> > > > > + struct mem_cgroup *mem_cgroup;
> > > > > struct list_head lru; /* per cgroup LRU list */
> > > > > +#endif
> > > > > };
> > > >
> > > > If CONFIG_CGROUP_MEM_RES_CTLR is not enabled and CGROUP_PAGE is
> > > > (assuming that the depends on below is refactored), what would this
> > > > change buy us? What is page_cgroup helping us track, the mem_cgroup is
> > > > factored out, so we are interested in the flags only?
> > > >
> > > plz remove CONFIG. This jsut makes code complicated.
> > > or plz use your own infrastructure, not depends on page_cgroup.
>
> Thanks for reviewing the patch.
> Do you mean that remove only CONFIG_CGROUP_MEM_RES_CTR in struct
> page_cgroup? Is it OK to define CONFIG_CGROUP_PAGE?
>
> > BTW, you can't modify page_cgroup->flags bit without cmpxchg.
> > Then, patch [5/9] is completely broken, now because new bit is used
> > with atomic bit ops but without lock_page_cgroup(). (see mmotm)
> >
> > Why struct page's flags bit can includes zone id etc...is just because
> > it's initalized before using. Anyway, this is "flags" bit. If you want
> > to modify multiple bit at once, plz use cmpxchg.
> > Then, I buy patch [8/9] and just skip this patch.
>
> O.K. I'll use cmpxchg.
>
> > But, following is more straightforward. (and what you do is not different
> > from this.)
> > ==
> > struct page {
> > .....
> > #ifdef CONFIG_BLOCKIO_CGROUP
> > void *blockio_cgroup;
> > #endif
> > }
> > ==
>
> This increases the size of struct page. Could I get a consensus on
> this approach?
>
This defeats the entire purpose of page_cgroup, IMHO. You need to add
the cgroup pointer to page_cgroup or use css id's there.
> Thanks,
> Ryo Tsuruta
>
> > Regards,
> > -Kame
> >
> >
--
Balbir
next prev parent reply other threads:[~2009-07-22 8:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 14:09 [PATCH 1/9] I/O bandwidth controller and BIO tracking Ryo Tsuruta
2009-07-21 14:10 ` [PATCH 2/9] dm-ioband-1.12.1: All-in-one patch Ryo Tsuruta
2009-07-21 14:12 ` [PATCH 3/9] blkio-cgroup-v9: The new page_cgroup framework Ryo Tsuruta
2009-07-21 14:13 ` [PATCH 4/9] blkio-cgroup-v9: Refactoring io-context initialization Ryo Tsuruta
2009-07-21 14:14 ` [PATCH 5/9] blkio-cgroup-v9: The body of blkio-cgroup Ryo Tsuruta
2009-07-21 14:15 ` [PATCH 6/9] blkio-cgroup-v9: The document " Ryo Tsuruta
2009-07-21 14:23 ` [PATCH 7/9] blkio-cgroup-v9: Page tracking hooks Ryo Tsuruta
2009-07-21 14:24 ` [PATCH 8/9] blkio-cgroup-v9: Fast page tracking Ryo Tsuruta
2009-07-21 14:24 ` [PATCH 9/9] blkio-cgroup-v9: Add a cgroup support to dm-ioband Ryo Tsuruta
2009-07-22 2:17 ` [PATCH 7/9] blkio-cgroup-v9: Page tracking hooks KAMEZAWA Hiroyuki
2009-07-22 9:40 ` Ryo Tsuruta
2009-07-23 0:18 ` KAMEZAWA Hiroyuki
2009-07-23 6:38 ` [Xen-devel] " Ryo Tsuruta
2009-07-23 7:49 ` KAMEZAWA Hiroyuki
2009-07-23 10:02 ` Ryo Tsuruta
2009-07-23 12:02 ` KAMEZAWA Hiroyuki
2009-07-24 5:44 ` Ryo Tsuruta
2009-07-24 6:19 ` KAMEZAWA Hiroyuki
2009-07-24 8:48 ` Ryo Tsuruta
2009-07-22 2:11 ` [PATCH 5/9] blkio-cgroup-v9: The body of blkio-cgroup KAMEZAWA Hiroyuki
2009-07-21 15:56 ` [PATCH 3/9] blkio-cgroup-v9: The new page_cgroup framework Balbir Singh
2009-07-22 1:20 ` KAMEZAWA Hiroyuki
2009-07-22 2:07 ` KAMEZAWA Hiroyuki
2009-07-22 8:28 ` Ryo Tsuruta
2009-07-22 8:37 ` Balbir Singh [this message]
2009-07-22 8:46 ` KAMEZAWA Hiroyuki
2009-07-22 8:39 ` KAMEZAWA Hiroyuki
2009-07-22 9:30 ` Ryo Tsuruta
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=20090722083722.GI24157@balbir.in.ibm.com \
--to=balbir@linux.vnet.ibm.com \
--cc=agk@redhat.com \
--cc=containers@lists.linux-foundation.org \
--cc=dm-devel@redhat.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ryov@valinux.co.jp \
--cc=virtualization@lists.linux-foundation.org \
--cc=xen-devel@lists.xensource.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
all inboxes | Powered by JetHome®