[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] xen: credit2: avoid vCPUs to ever reach lower credits than idle
On Thu, 2020-03-12 at 17:00 +0100, Jürgen Groß wrote: > On 12.03.20 16:26, Jan Beulich wrote: > > On 12.03.2020 14:44, Dario Faggioli wrote: > > > --- a/xen/common/sched/credit2.c > > > +++ b/xen/common/sched/credit2.c > > > @@ -234,7 +234,7 @@ > > > * units does not consume credits, and it must be lower than > > > whatever > > > * amount of credit 'regular' unit would end up with. > > > */ > > > -#define CSCHED2_IDLE_CREDIT (-(1U<<30)) > > > +#define CSCHED2_IDLE_CREDIT INT_MIN > > > > The title saying "lower than", is "equal" actually fine? Looking > > at e.g. runq_insert() I'm getting the impression it's not. > > > > Looking at t2c_update() I'm also getting the impression that > > there's UB when the subtraction underflows. After all, if > > -1 << 30 wasn't small enough a value, I don't see why -1 << 31 > > would be. > > Yes, I'd limit svc->credit in t2c_update() to CSCHED2_IDLE_CREDIT+1 > Right, after having spoken with George as well, I guess I'll go for something like that (by imposing some boundaries to `val`, in that function, I think). Thanks and Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ------------------------------------------------------------------- <<This happens because _I_ choose it to happen!>> (Raistlin Majere) Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |