[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xl: check for meaningful combination of sedf config file parameters
On Wed, 2012-06-06 at 12:05 +0100, Dario Faggioli wrote: > On Wed, 2012-06-06 at 11:35 +0100, Ian Campbell wrote: > > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > > > --- a/tools/libxl/xl_cmdimpl.c > > > +++ b/tools/libxl/xl_cmdimpl.c > > > @@ -561,6 +561,7 @@ static void parse_config_data(const char > > > long l; > > > XLU_Config *config; > > > XLU_ConfigList *cpus, *vbds, *nics, *pcis, *cvfbs, *cpuids; > > > + int opt_w = 0, opt_p = 0, opt_s = 0; > > > > These names don't make much sense in this context. > > > Yeah, I agree... It's just I needed something :-/ > > > Perhaps you can just check each interesting option against the > > corresponding LIBXL_DOAIN_SCHED_PARAM_DEFAULT? > > > Mmm... I was mistakenly thinking these default values not to be there > yet, but I now see it. Yes, I guess I can do that. > > > That might make some long > > lines. Perhaps pulling this out into a separate valid_sched_params() > > would help with that? > > > Maybe, but what to put here depends on your thought on the below... > > > > if (!xlu_cfg_get_long (config, "latency", &l, 0)) > > > b_info->sched_params.latency = l; > > > if (!xlu_cfg_get_long (config, "extratime", &l, 0)) > > > b_info->sched_params.extratime = l; > > > + /* The sedf scheduler needs some more consistency checking */ > > > + if (opt_w && (opt_p || opt_s)) { > > > + fprintf(stderr, "Either specify a weight OR a period and > > > slice\n"); > > > > Does this constrain you from setting valid combinations of credit* > > parameters? I think not since period and slice are SEDF specific. > > > I'd say not at all, for the exact reason you're suggesting. Then, if you > ask what happens if you boot with sched=credit and then try to specify > both a cpu_weight and a period, then yes, it will kick you out. > > The whole point is, period and slice are only meaningful for sedf so, if > you are using them, I take it like you meant to be using sedf, and thus > asking for a cpu_weight at the same time is wrong. > > Of course, one can think at it the other way around (scheduler is > credit, so cpu_weight is fine and period and slice should be ignored). > If that is better, I can add a libxl_is_the_scheduler_credit? kind of > check to that if... Lets keep it simple for now and go with the "don't do that" answer -- i.e. reject as invalid setting weight and period regardless of the actual scheduler in use. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |