[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen, credit2: Avoid extra c2t calcuation in csched_runtime
>>> On 24.01.13 at 16:55, George Dunlap <george.dunlap@xxxxxxxxxxxxx> wrote: > On 24/01/13 15:45, Jan Beulich wrote: >>>>> On 24.01.13 at 16:24, George Dunlap <george.dunlap@xxxxxxxxxxxxx> wrote: >>> + /* FIXME: See if we can eliminate this conversion if we know time >>> + * will be outside (MIN,MAX). Probably requires pre-calculating >>> + * credit values of MIN,MAX per vcpu, since each vcpu burns credit >>> + * at a different rate. */ >> The obvious situation is when rt_credit <= 0, which you could >> deal with right away. > > That shouldn't be possible: > 1. csched_runtime() should only be called on someone about to be > scheduled (from csched_schedule()). > 2. The credit of such an snext should always be higher than anyone else > on the queue (or they would be scheduled instead). > 3. If someone is about to be scheduled with snext->credit <= 0, it will > trigger reset_credt(), which will make everyone's credit positive. > 4. 3 guarantees that snext->credit will be positive > 5. 2 guatantees that (snext->credit - swait->credit) will be positive > 6 So rt_credit should never be <= 0. > > I can add an assert to this effect if you like. That would be nice, because I came up with the whole thing just because I was trying to understand whether the 2nd argument to c2t() in the invocation this change removes could go negative. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |