Hi Chandra,

Thanks for your comments.

Chandra Seetharaman wrote:
> Hi Maeda-san,
> 
> Thanks for the patch. I agree with the approach.
> 
> One additional change is needed though...
> we need some valid number to work with when the user starts to create
> class and assigning shares. Basically, we should prevent the user from
> changing shares (from dontcare) of a child class if the total numtasks
> is "unlimited".

To think of it, I have to learn the basic design concept of CKRM
resource controller.

> 
> See below for coding related comments.
> 

>>              token = match_token(p, numtasks_tokens, args);
>>              switch (token) {
>>              case numtasks_token_total:
>>-                     if (match_int(args, &new_total) ||
>>-                                             (new_total < total_cnt_alloc)) {
>>+                     if ((s = match_strdup(args)) == NULL) {
>>                              err = -EINVAL;
> 
> 
> shouldn't we return -ENOMEM ?

Agree. It should return -ENOMEM.

> 
>>-                     } else {
>>+                             break;
>>+                     } 
>>+                     new_total = simple_strtol(s, NULL, 0); 
> 
> 
> one problem we had with strtol is that it behaves badly when the given
> number overflows int. Matt Helsley posted a patch (for strtol usage in
> order in rbce) a while ago. Have a look at the patch and see this code
> follows the logic there.

OK. I will take care of it.

Thanks,
MAEDA Naoaki



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech

Reply via email to