On Thu, Feb 09, 2006 at 03:11:52PM +0900, KUROSAWA Takahiro wrote:
> This patch provides a resource controller for controlling the CPU ratio 
> per class in CKRM. It is just an interface to kernel/cpu_rc.c

[snip]

> +static int __devinit ckrm_cpu_notify(struct notifier_block *self,
> +                             unsigned long action, void *hcpu)
> +{
> +     struct ckrm_class *cls = &ckrm_default_class;
> +     struct ckrm_class *child = NULL;
> +     struct ckrm_cpu *res;
> +     int     cpu = (long) hcpu;
> +
> +     switch (action) {
> +

[snip]

> +             /* FALL THROUGH */
> +     case CPU_UP_PREPARE:
             ^^^^^^^^^^^^^^
                This should be done at CPU_ONLINE time (since the new CPU won't
be in the cpu_online_map yet)?

> +             grcd.cpus = cpu_online_map;
> +             grcd.numcpus = cpus_weight(cpu_online_map);
> +             break;



--- kernel/ckrm/ckrm_cpu.c.org  2006-01-31 11:37:46.000000000 +0530
+++ kernel/ckrm/ckrm_cpu.c      2006-01-31 11:39:30.000000000 +0530
@@ -295,7 +295,7 @@ static int __devinit ckrm_cpu_notify(str
                }
                ckrm_unlock_hier(cls);
                /* FALL THROUGH */
-       case CPU_UP_PREPARE:
+       case CPU_ONLINE:
                grcd.cpus = cpu_online_map;
                grcd.numcpus = cpus_weight(cpu_online_map);
                break;


-- 
Regards,
vatsa


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
ckrm-tech mailing list
https://lists.sourceforge.net/lists/listinfo/ckrm-tech

Reply via email to