linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Subject: Re: [RFC][PATCH 1/2][memcg] moving memcg's node info array to virtually contiguous array
Date: Thu, 22 Jul 2010 14:43:56 +0900	[thread overview]
Message-ID: <20100722144356.b9681621.nishimura@mxp.nes.nec.co.jp> (raw)
In-Reply-To: <20100721195831.6aa8dca5.kamezawa.hiroyu@jp.fujitsu.com>

On Wed, 21 Jul 2010 19:58:31 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

> These are just a _toy_ level patches yet. My final purpose is to use indexed array
> for mem_cgroup itself, it has IDs.
> 
> Background:
>   memory cgroup uses struct page_cgroup for tracking all used pages. It's defined as
> ==
> struct page_cgroup {
>         unsigned long flags;
>         struct mem_cgroup *mem_cgroup;
>         struct page *page;
>         struct list_head lru;           /* per cgroup LRU list */
> };
> ==
>   and this increase the cost of per-page-objects dramatically. Now, we have
>   troubles on this object.
>   1.  Recently, a blkio-tracking guy wants to add "blockio-cgroup" information
>       to page_cgroup. But our concern is extra 8bytes per page.
>   2.  At tracking dirty page status etc...we need some trick for safe access
>       to page_cgroup and memcgroup's information. For example, a small seqlock.
> 
> Now, each memory cgroup has its own ID (0-65535). So, if we can replace
> 8byte of pointer "pc->mem_cgroup" with an ID, which is 2 bytes, we may able
> to have another room. (Moreover, I think we can reduce the number of IDs...)
> 
> This patch is a trial for implement a virually-indexed on-demand array and
> an example of usage. Any commetns are welcome.
> 
So, your purpose is to:

- make the size of mem_croup small(by [2/2])
- manage all the mem_cgroup in virt-array indexed by its ID(it would be faster
  than using css_lookup)
- replace pc->mem_cgroup by its ID and make the size of page_cgroup small

right?

Thanks,
Daisuke Nishimura.

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

  parent reply	other threads:[~2010-07-22  5:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-21 10:58 KAMEZAWA Hiroyuki
2010-07-21 11:00 ` [RFC][PATCH 2/2][memcg] use virt-array for memcg KAMEZAWA Hiroyuki
2010-07-22  5:43 ` Daisuke Nishimura [this message]
2010-07-22  6:04   ` [RFC][PATCH 1/2][memcg] moving memcg's node info array to virtually contiguous array KAMEZAWA Hiroyuki
2010-07-22  7:54     ` Daisuke Nishimura
2010-07-22  7:59       ` 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=20100722144356.b9681621.nishimura@mxp.nes.nec.co.jp \
    --to=nishimura@mxp.nes.nec.co.jp \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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