[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC v1 2/4] xl for rt scheduler
On Fri, Jul 11, 2014 at 12:49:56AM -0400, Meng Xu wrote: [...] > > =head1 CPUPOOLS COMMANDS > diff --git a/tools/libxl/xl.h b/tools/libxl/xl.h > index 10a2e66..51b634a 100644 > --- a/tools/libxl/xl.h > +++ b/tools/libxl/xl.h > @@ -67,6 +67,7 @@ int main_memset(int argc, char **argv); > int main_sched_credit(int argc, char **argv); > int main_sched_credit2(int argc, char **argv); > int main_sched_sedf(int argc, char **argv); > +int main_sched_rt(int argc, char **argv); > int main_domid(int argc, char **argv); > int main_domname(int argc, char **argv); > int main_rename(int argc, char **argv); > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 68df548..c043f88 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -4947,6 +4947,7 @@ int main_sharing(int argc, char **argv) > return 0; > } > > + Stray blank line. > static int sched_domain_get(libxl_scheduler sched, int domid, > libxl_domain_sched_params *scinfo) > { > @@ -5098,6 +5099,52 @@ static int sched_sedf_domain_output( > return 0; > } > > + > +static int sched_rt_domain_output( > + int domid) > +{ > + char *domname; > + libxl_domain_sched_params scinfo; > + int rc, i; > + > + if (domid < 0) { > + printf("%-33s %4s %4s %6s %6s\n", "Name", "ID", "VCPU", "Period", > "Budget"); > + return 0; > + } > + Just print the header and nothing more? > + libxl_domain_sched_params_init(&scinfo); > + rc = sched_domain_get(LIBXL_SCHEDULER_RT, domid, &scinfo); > + if (rc) > + return rc; > + This is violating libxl type paradigm. See libxl.h. 263 * libxl types 264 * 265 * Most libxl types are defined by the libxl IDL (see 266 * libxl_types.idl). The library provides a common set of methods for 267 * initialising and freeing these types. 268 * 269 * IDL-generated libxl types should be used as follows: the user must 270 * always call the "init" function before using a type, even if the 271 * variable is simply being passed by reference as an out parameter 272 * to a libxl function. The user must always calls "dispose" exactly 273 * once afterwards, to clean up, regardless of whether operations on 274 * this object succeeded or failed. See the xl code for examples. And you should check other places that use libxl types as well. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |