[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [BUG] unfairness in Xen's credit scheduler
On Mon, Sep 2, 2013 at 10:54 AM, <lwcheng@xxxxxxxxx> wrote: > Hi all, > > Since Xen 4.2.0, users can change time slice of the scheduler at > runtime via xl command line, a very nice feature. However, it is > not *correctly* implemented. > > Problem description > -------------------- > say you set the 'cap' of one VM to 50 (a half core), > -when setting the time slice to be *greater* than 30ms, the VM gets > much *less* CPU cycles than its allocation > -when setting the time slice to be *smaller* than 30ms, the VM gets > much *more* CPU cycles than its allocation > > > Problem happens in sched_credit.c/csched_sys_cntl(): > -------------------- > after changing prv->tslice_ms, other parameters *should* also be > changed accordingly: > > csched_sys_cntl() { > ... > prv->tslice_ms = params->tslice_ms; > prv->ratelimit_us = params->ratelimit_us; > ------- > /* my patch: these parameters should also be changed */ > prv->ticks_per_tslice = CSCHED_TICKS_PER_TSLICE; > if ( prv->tslice_ms < prv->ticks_per_tslice ) > prv->ticks_per_tslice = 1; > prv->tick_period_us = prv->tslice_ms * 1000 / prv->ticks_per_tslice; > prv->credits_per_tslice = CSCHED_CREDITS_PER_MSEC * prv->tslice_ms; Oh, right -- sorry, that was my patch, and I don't know what I was thinking. If you have time, could you make a patch which creates a function to do this, and have both SCHEDOP_put_into and csched_init() call it? That way we avoid duplicating the code. Some hints for making a good patch and sending it to the list can be found here: http://wiki.xen.org/wiki/Submitting_Xen_Patches Thanks! -George _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |