[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 2/2] sched_credit2.c: runqueue_per_core code



> @@ -161,10 +161,16 @@
>   */
>  #define __CSFLAG_runq_migrate_request 3
>  #define CSFLAG_runq_migrate_request (1<<__CSFLAG_runq_migrate_request)
> -
> +/* CREDIT2_OPT_RUNQUEUE: Used to define the runqueue used
> + */
> +#define CREDIT2_OPT_RUNQUEUE_CORE 1
> +#define CREDIT2_OPT_RUNQUEUE_SOCKET 2
>  
>  int opt_migrate_resist=500;
>  integer_param("sched_credit2_migrate_resist", opt_migrate_resist);
> +char __initdata opt_credit2_runqueue_string[10] = "core";
> +string_param("credit2_runqueue", opt_credit2_runqueue_string);
> +int opt_credit2_runqueue = CREDIT2_OPT_RUNQUEUE_CORE;

static (as said before - please don't have people repeat comments
given on earlier versions). Also placing opt_credit2_runqueue_string[]
into .init.data is incompatible with accessing it ...

> @@ -2109,6 +2115,17 @@ csched2_init(struct scheduler *ops)
>          opt_load_window_shift = LOADAVG_WINDOW_SHIFT_MIN;
>      }
>  
> +    /* Defines the runqueue used. */
> +    if ( !strcmp(opt_credit2_runqueue_string, "socket") )
> +        opt_credit2_runqueue = CREDIT2_OPT_RUNQUEUE_SOCKET;
> +    else if ( strcmp(opt_credit2_runqueue_string, "core") )
> +        printk("WARNING, unrecognized credit2_runqueue option %s, using 
> core\n",
> +                opt_credit2_runqueue_string);

... here. Rather than simply dropping the __initdata, making this
a custom_param() would seem the right course of action (allowing
the char array to be dropped altogether).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.