Re: [PATCH 1/6] res_counter: handle limit change

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Menage
Date: Thursday, June 19, 2008 - 10:09 pm

On Fri, Jun 13, 2008 at 2:29 AM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@jp.fujitsu.com> wrote:

Sorry for the delay in looking at this.

I think the basic idea is great.


We should also add the limit/usage write strategy function in here too.



As Pavel mentioned, a pointer would be better here.

I would rather just see res_counter_init() take an ops parameter, and
update the (few) users of res_counter.



As others have pointed out, there are some subsystems where usage
can't be shrunk. Maybe provide a "res_counter_unshrinkable()" function
that always returns -EBUSY and can be used by subsystems that can't
handle shrinking?


Would this be simpler as just

if (member == RES_LIMIT && counter->ops.shrink_usage) {
  ret = res_counter_resize_limit(counter, tmp);
} else {
  ...
}

Paul
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/6] memcg: hierarchy updates (v4), KAMEZAWA Hiroyuki, (Fri Jun 13, 2:27 am)
[PATCH 1/6] res_counter: handle limit change, KAMEZAWA Hiroyuki, (Fri Jun 13, 2:29 am)
[PATCH 2/6] memcg: handle limit change, KAMEZAWA Hiroyuki, (Fri Jun 13, 2:30 am)
[PATCH 3/6] memcg: reset limit at rmdir, KAMEZAWA Hiroyuki, (Fri Jun 13, 2:31 am)
[PATCH 4/6] res_counter: basic hierarchy support, KAMEZAWA Hiroyuki, (Fri Jun 13, 2:34 am)
[PATCH 5/6] res_counter: HARDWALL hierarchy, KAMEZAWA Hiroyuki, (Fri Jun 13, 2:36 am)
[PATCH 6/6] memcg: HARDWALL hierarchy, KAMEZAWA Hiroyuki, (Fri Jun 13, 2:37 am)
Re: [PATCH 1/6] res_counter: handle limit change, Pavel Emelyanov, (Sun Jun 15, 11:38 pm)
Re: Re: [PATCH 1/6] res_counter: handle limit change, kamezawa.hiroyu, (Mon Jun 16, 12:39 am)
Re: [PATCH 1/6] res_counter: handle limit change, Pavel Emelyanov, (Mon Jun 16, 12:51 am)
Re: Re: [PATCH 1/6] res_counter: handle limit change, kamezawa.hiroyu, (Mon Jun 16, 1:17 am)
Re: [PATCH 1/6] res_counter: handle limit change, Pavel Emelyanov, (Mon Jun 16, 1:23 am)
Re: Re: [PATCH 1/6] res_counter: handle limit change, kamezawa.hiroyu, (Mon Jun 16, 1:32 am)
Re: [PATCH 1/6] res_counter: handle limit change, Pavel Emelyanov, (Mon Jun 16, 1:47 am)
Re: Re: Re: [PATCH 1/6] res_counter: handle limit change, kamezawa.hiroyu, (Mon Jun 16, 1:53 am)
Re: [PATCH 1/6] res_counter: handle limit change, Balbir Singh, (Mon Jun 16, 1:57 am)
Re: [PATCH 1/6] res_counter: handle limit change, Pavel Emelyanov, (Mon Jun 16, 1:59 am)
Re: [PATCH 1/6] res_counter: handle limit change, Pavel Emelyanov, (Mon Jun 16, 2:00 am)
Re: Re: [PATCH 1/6] res_counter: handle limit change, kamezawa.hiroyu, (Mon Jun 16, 2:01 am)
Re: Re: [PATCH 1/6] res_counter: handle limit change, kamezawa.hiroyu, (Mon Jun 16, 2:04 am)
Re: [PATCH 1/6] res_counter: handle limit change, Balbir Singh, (Mon Jun 16, 5:29 am)
Re: Re: [PATCH 1/6] res_counter: handle limit change, kamezawa.hiroyu, (Mon Jun 16, 6:26 am)
Re: [PATCH 1/6] res_counter: handle limit change, Paul Menage, (Thu Jun 19, 10:09 pm)
Re: [PATCH 6/6] memcg: HARDWALL hierarchy, Randy Dunlap, (Mon Jun 23, 3:29 pm)
Re: [PATCH 4/6] res_counter: basic hierarchy support, Randy Dunlap, (Mon Jun 23, 3:37 pm)
Re: [PATCH 1/6] res_counter: handle limit change, Randy Dunlap, (Mon Jun 23, 3:40 pm)