Linux Container Development
 help / color / mirror / Atom feed
From: yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org (YAMAMOTO Takashi)
To: kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
	balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org
Subject: Re: [RFC][ for -mm] memory cgroup enhancements take3 [9/9] per zone stat
Date: Tue, 30 Oct 2007 21:42:41 +0900 (JST)	[thread overview]
Message-ID: <20071030124241.654F91C5BE4@siro.lan> (raw)
In-Reply-To: Your message of "Tue, 30 Oct 2007 21:36:15 +0900" <20071030213615.abbdfba5.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>

> > > +	if (active && !(pc->flags & PAGE_CGROUP_FLAG_ACTIVE))
> > > +		direction = 1; /*from inactive to acvive */
> > > +	if (!active && (pc->flags & PAGE_CGROUP_FLAG_ACTIVE))
> > > +		direction = -1;
> > > +
> > > +	if (direction) {
> > > +		struct mem_cgroup_zonestat *zstat = &pc->mem_cgroup->zonestat;
> > > +		int index = page_cgroup_to_zonestat_index(pc);
> > > +		preempt_disable();
> > > +		__mem_cgroup_zonestat_add(zstat, MEM_CGROUP_ZONESTAT_ACTIVE,
> > > +			direction, index);
> > > +		__mem_cgroup_zonestat_add(zstat, MEM_CGROUP_ZONESTAT_INACTIVE,
> > > +			direction, index);
> > 
> > dec?
> > 
> direction(add value) is 1 or -1 here. Hmm, this is maybe confusing.
> ok, I'll clean up this.

adding the same value to both of active and inactive seems wrong.
i think you want to subtract 'direction' from inactive here.

YAMAMOTO Takashi

  parent reply	other threads:[~2007-10-30 12:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-30 11:12 [RFC][ for -mm] memory cgroup enhancements take3 [0/9] intro KAMEZAWA Hiroyuki
     [not found] ` <20071030201206.86a510e0.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-30 11:14   ` [RFC][ for -mm] memory cgroup enhancements take3 [1/9] fix try_to_free_mem_cgroup_pages() numa handling KAMEZAWA Hiroyuki
     [not found]     ` <20071030201431.56f6b242.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-30 12:05       ` Balbir Singh
     [not found]         ` <47271DED.1090002-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-10-30 12:33           ` KAMEZAWA Hiroyuki
2007-10-30 17:31       ` Dave Hansen
2007-10-30 18:28         ` Balbir Singh
     [not found]           ` <472777B0.3020405-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-10-31  5:36             ` KAMEZAWA Hiroyuki
2007-10-30 11:15   ` [RFC][ for -mm] memory cgroup enhancements take3 [2/9] add force_empty KAMEZAWA Hiroyuki
2007-10-30 11:16   ` [RFC][ for -mm] memory cgroup enhancements take3 [3/9] remember page cache KAMEZAWA Hiroyuki
     [not found]     ` <20071030201655.770fcd5e.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-30 12:22       ` YAMAMOTO Takashi
     [not found]         ` <20071030122252.5C4B61C5BD5-Pcsii4f/SVk@public.gmane.org>
2007-10-30 12:34           ` KAMEZAWA Hiroyuki
2007-10-30 11:17   ` [RFC][ for -mm] memory cgroup enhancements take3 [4/9] remember active KAMEZAWA Hiroyuki
2007-10-30 11:18   ` [RFC][ for -mm] memory cgroup enhancements take3 [5/9] per-cpu status accounting KAMEZAWA Hiroyuki
2007-10-30 11:19   ` [RFC][ for -mm] memory cgroup enhancements take3 [7/9] add memory.stat file KAMEZAWA Hiroyuki
2007-10-30 11:20   ` [RFC][ for -mm] memory cgroup enhancements take3 [7/9] add pre_destory KAMEZAWA Hiroyuki
2007-10-30 11:21   ` [RFC][ for -mm] memory cgroup enhancements take3 [8/9] implicit force_empty at rmdir KAMEZAWA Hiroyuki
2007-10-30 11:23   ` [RFC][ for -mm] memory cgroup enhancements take3 [9/9] per zone stat KAMEZAWA Hiroyuki
     [not found]     ` <20071030202332.ee86df03.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-30 12:32       ` YAMAMOTO Takashi
     [not found]         ` <20071030123259.3CF2D1C5BD5-Pcsii4f/SVk@public.gmane.org>
2007-10-30 12:36           ` KAMEZAWA Hiroyuki
     [not found]             ` <20071030213615.abbdfba5.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-30 12:42               ` YAMAMOTO Takashi [this message]
     [not found]                 ` <20071030124241.654F91C5BE4-Pcsii4f/SVk@public.gmane.org>
2007-10-30 12:44                   ` 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=20071030124241.654F91C5BE4@siro.lan \
    --to=yamamoto-jcdqpdek3idl9jvzuh4aog@public.gmane.org \
    --cc=balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.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