From: kamezawa.hiroyu@jp.fujitsu.com
To: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Cc: kamezawa.hiroyu@jp.fujitsu.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, balbir@linux.vnet.ibm.com,
xemul@openvz.org, menage@google.com, lizf@cn.fujitsu.com
Subject: Re: Re: [RFC][PATCH 1/2] memcg: res_counter hierarchy
Date: Mon, 2 Jun 2008 18:52:32 +0900 (JST) [thread overview]
Message-ID: <28005342.1212400352991.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20080602021540.5C6705A0D@siro.lan>
----- Original Message -----
>> @@ -135,13 +138,118 @@ ssize_t res_counter_write(struct res_cou
>> if (*end != '\0')
>> goto out_free;
>> }
>> - spin_lock_irqsave(&counter->lock, flags);
>> - val = res_counter_member(counter, member);
>> - *val = tmp;
>> - spin_unlock_irqrestore(&counter->lock, flags);
>> - ret = nbytes;
>> + if (member != RES_LIMIT || !callback) {
>
>is there any reason to check member != RES_LIMIT here,
>rather than in callers?
Hmm...ok. This is messy. I'll rearrange this.
>
>> +/*
>> + * Move resource to its parent.
>> + * child->limit -= val.
>> + * parent->usage -= val.
>> + * parent->limit -= val.
>
>s/limit/for_children/
>
>> + */
>> +
>> +int res_counter_repay_resource(struct res_counter *child,
>> + struct res_counter *parent,
>> + unsigned long long val,
>> + res_shrink_callback_t callback, int retry)
>
>can you reduce gratuitous differences between
>res_counter_borrow_resource and res_counter_repay_resource?
>eg. 'success' vs 'done', how to decrement 'retry'.
>
Ah, sorry. I'll rewrite.
I'll make next version's quality better.
Thanks,
-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>
next prev parent reply other threads:[~2008-06-02 9:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-30 1:43 [RFC][PATCH 0/2] memcg: simple hierarchy (v2) KAMEZAWA Hiroyuki
2008-05-30 1:45 ` [RFC][PATCH 1/2] memcg: res_counter hierarchy KAMEZAWA Hiroyuki
2008-05-30 22:20 ` Balbir Singh
2008-05-31 1:59 ` kamezawa.hiroyu
2008-05-31 11:20 ` Balbir Singh
2008-05-31 14:47 ` kamezawa.hiroyu
2008-05-31 17:18 ` Balbir Singh
2008-06-01 0:35 ` kamezawa.hiroyu
2008-06-02 6:16 ` Balbir Singh
2008-06-02 9:48 ` kamezawa.hiroyu
2008-06-02 2:15 ` YAMAMOTO Takashi
2008-06-02 9:52 ` kamezawa.hiroyu [this message]
2008-05-30 1:46 ` [RFC][PATCH 2/2] memcg: memcg hierarchy KAMEZAWA Hiroyuki
2008-05-30 1:46 ` [RFC][PATCH 0/2] memcg: simple hierarchy (v2) Rik van Riel
2008-06-09 10:37 [RFC][PATCH 1/2] memcg: res_counter hierarchy Balbir Singh
2008-06-04 4:58 ` [RFC][PATCH 0/2] memcg: hierarchy support (v3) KAMEZAWA Hiroyuki
2008-06-04 5:01 ` [RFC][PATCH 1/2] memcg: res_counter hierarchy KAMEZAWA Hiroyuki
2008-06-09 9:48 ` Balbir Singh
2008-06-09 10:20 ` KAMEZAWA Hiroyuki
2008-06-09 12:02 ` kamezawa.hiroyu
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=28005342.1212400352991.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=xemul@openvz.org \
--cc=yamamoto@valinux.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