[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 Sun, 2014-07-13 at 08:58 -0400, Meng Xu wrote: > Look around, both in xl and libxl, you'll find plenty of > examples of > that. > > > We actually followed the way credit scheduler does > > in main_sched_credit(int argc, char **argv) > > > > > > } else { /* set credit scheduler paramaters */ > > libxl_domain_sched_params scinfo; > > libxl_domain_sched_params_init(&scinfo); > > scinfo.sched = LIBXL_SCHEDULER_CREDIT; > > if (opt_w) > > scinfo.weight = weight; > > if (opt_c) > > scinfo.cap = cap; > > rc = sched_domain_set(domid, &scinfo); > > libxl_domain_sched_params_dispose(&scinfo); > > > And in fact, here's dispose! :-) > > > > I think you are right! But I think the implementation of this > functionality for credit scheduler also has the exactly same issue: > scinfo will not be disposed when hypercall returns false. Yes, there's quite a lot of code in libxl and xl which is not correct in this area but which happens to be "OK" because the struct in question has no dynamically allocated members. So this is a latent bug since if we were to add a dynamic member to the struct all this code would become immediately buggy. We should try to stamp these out as we notice them (as we have done here). Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |