[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <28005342.1212400352991.kamezawa.hiroyu@jp.fujitsu.com>
Date: Mon, 2 Jun 2008 18:52:32 +0900 (JST)
From: kamezawa.hiroyu@...fujitsu.com
To: YAMAMOTO Takashi <yamamoto@...inux.co.jp>
Cc: kamezawa.hiroyu@...fujitsu.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, balbir@...ux.vnet.ibm.com,
xemul@...nvz.org, menage@...gle.com, lizf@...fujitsu.com
Subject: Re: Re: [RFC][PATCH 1/2] memcg: res_counter hierarchy
----- 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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists