linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kamezawa.hiroyu@jp.fujitsu.com
To: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
	balbir@linux.vnet.ibm.com
Subject: Re: Re: [PATCH 3/6] memcg: charge-commit-cancel protocl
Date: Wed, 1 Oct 2008 19:04:56 +0900 (JST)	[thread overview]
Message-ID: <4885269.1222855496500.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20081001173313.69fb8c74.nishimura@mxp.nes.nec.co.jp>

----- Original Message -----
>> @@ -531,18 +529,33 @@ static int mem_cgroup_charge_common(stru
>>  
>>  		if (!nr_retries--) {
>>  			mem_cgroup_out_of_memory(mem, gfp_mask);
>> -			goto out;
>> +			goto nomem;
>>  		}
>>  	}
>> +	return 0;
>> +nomem:
>> +	css_put(&mem->css);
>> +	return -ENOMEM;
>> +}
>>  
>> +/*
>> + * commit a charge got by mem_cgroup_try_charge() and makes page_cgroup to
 be
>> + * USED state. If already USED, uncharge and return.
>> + */
>> +
>> +static void __mem_cgroup_commit_charge(struct mem_cgroup *mem,
>> +				     struct page_cgroup *pc,
>> +				     enum charge_type ctype)
>> +{
>> +	struct mem_cgroup_per_zone *mz;
>> +	unsigned long flags;
>>  
>>  	lock_page_cgroup(pc);
>>  	if (unlikely(PageCgroupUsed(pc))) {
>>  		unlock_page_cgroup(pc);
>>  		res_counter_uncharge(&mem->res, PAGE_SIZE);
>>  		css_put(&mem->css);
>> -
>> -		goto done;
>> +		return;
>>  	}
>>  	pc->mem_cgroup = mem;
>>  	/*
>
>Hmm, this patch cannot be applied because of this part.
>
>After [2/6], mem_cgroup_charge_common looks like:
>
>---
>                if (!nr_retries--) {
>                        mem_cgroup_out_of_memory(mem, gfp_mask);
>                        goto out;
>                }
>        }
>
>
>        lock_page_cgroup(pc);
>
>        if (unlikely(PageCgroupUsed(pc))) {
>                unlock_page_cgroup(pc);
>                res_counter_uncharge(&mem->res, PAGE_SIZE);
>                css_put(&mem->css);
>
>                goto done;
>        }
>        pc->mem_cgroup = mem;
>        /*
>---
>
>There is an empty line after lock_page_cgroup.
>
>After removing this line, I can appliy this patch(and [4-6/6]).
>
Ah, sorry. maybe refresh miss..

I'll check it again tomorrow.

Thanks,
-Kame


>
>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:[~2008-10-01 10:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-01  7:52 [PATCH 0/6] memcg update v6 (for review and discuss) KAMEZAWA Hiroyuki
2008-10-01  7:55 ` [PATCH 1/6] atomic page_cgroup flags KAMEZAWA Hiroyuki
2008-10-06  7:42   ` Balbir Singh
2008-10-01  7:56 ` [PATCH 2/6] memcg: allocate page_cgroup at boot KAMEZAWA Hiroyuki
2008-10-02  8:49   ` [PATCH 2/6] memcg: allocate page_cgroup at boot (hunk fix) KAMEZAWA Hiroyuki
2008-10-06 16:32     ` Balbir Singh
2008-10-06 10:11   ` [PATCH 2/6] memcg: allocate page_cgroup at boot Balbir Singh
2008-10-01  7:57 ` [PATCH 3/6] memcg: charge-commit-cancel protocl KAMEZAWA Hiroyuki
2008-10-01  8:33   ` Daisuke Nishimura
2008-10-01 10:04   ` kamezawa.hiroyu [this message]
2008-10-03 10:05   ` Daisuke Nishimura
2008-10-03 15:15   ` kamezawa.hiroyu
2008-10-03 15:25     ` Daisuke Nishimura
2008-10-08  9:05   ` [RFC] memcg: handle migration by charge-commit-cancel (was " KAMEZAWA Hiroyuki
2008-10-01  7:59 ` [PATCH 4/6] memcg: new force_empty and move_account KAMEZAWA Hiroyuki
2008-10-01 16:38   ` Randy Dunlap
2008-10-02  5:13     ` KAMEZAWA Hiroyuki
2008-10-01  8:00 ` [PATCH 5/6] memcg: lazy lru freeing KAMEZAWA Hiroyuki
2008-10-09  5:39   ` Daisuke Nishimura
2008-10-09  6:26     ` KAMEZAWA Hiroyuki
2008-10-01  8:01 ` [PATCH 6/6] memcg: lazy lru addition KAMEZAWA Hiroyuki
2008-10-09  6:21   ` Daisuke Nishimura
2008-10-09  6:51     ` KAMEZAWA Hiroyuki
2008-10-02  9:02 ` [PATCH 0/6] memcg update v6 (for review and discuss) KAMEZAWA Hiroyuki
2008-10-06 17:26   ` Balbir Singh
2008-10-07  1:22     ` 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=4885269.1222855496500.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=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