All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dfaggioli@suse.com>
To: "Jürgen Groß" <jgross@suse.com>, "Jan Beulich" <jbeulich@suse.com>
Cc: Charles Arnold <carnold@suse.com>, Glen <glenbarney@gmail.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Tomas Mozes <hydrapolic@gmail.com>, Sarah Newman <srn@prgmr.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH 1/2] xen: credit2: avoid vCPUs to ever reach lower credits than idle
Date: Thu, 12 Mar 2020 17:59:56 +0100	[thread overview]
Message-ID: <54fc0576bd7aa1ad213f5a07fef856c894e2d65f.camel@suse.com> (raw)
In-Reply-To: <21abe34e-54f0-70e3-d2f1-cf6984b5773a@suse.com>


[-- Attachment #1.1: Type: text/plain, Size: 1414 bytes --]

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 #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2020-03-12 17:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 13:44 [Xen-devel] [PATCH 0/2] xen: credit2: fix vcpu starvation due to too few credits Dario Faggioli
2020-03-12 13:44 ` [Xen-devel] [PATCH 1/2] xen: credit2: avoid vCPUs to ever reach lower credits than idle Dario Faggioli
2020-03-12 13:55   ` Andrew Cooper
2020-03-12 14:40     ` George Dunlap
2020-03-12 15:10       ` Dario Faggioli
2020-03-12 14:58     ` Dario Faggioli
2020-03-12 14:45   ` George Dunlap
2020-03-12 17:03     ` Dario Faggioli
2020-03-12 15:26   ` Jan Beulich
2020-03-12 16:00     ` Jürgen Groß
2020-03-12 16:59       ` Dario Faggioli [this message]
2020-03-12 16:11     ` Dario Faggioli
2020-03-12 16:36       ` Jan Beulich
2020-03-12 13:44 ` [Xen-devel] [PATCH 2/2] xen: credit2: fix credit reset happening too few times Dario Faggioli
2020-03-12 15:08 ` [Xen-devel] [PATCH 0/2] xen: credit2: fix vcpu starvation due to too few credits Roger Pau Monné
2020-03-12 17:02   ` Dario Faggioli
2020-03-12 17:59     ` Roger Pau Monné
2020-03-13  6:19       ` Dario Faggioli
2020-03-12 15:51 ` Jürgen Groß
2020-03-12 16:27   ` Andrew Cooper
2020-03-13  7:26     ` Dario Faggioli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54fc0576bd7aa1ad213f5a07fef856c894e2d65f.camel@suse.com \
    --to=dfaggioli@suse.com \
    --cc=carnold@suse.com \
    --cc=george.dunlap@citrix.com \
    --cc=glenbarney@gmail.com \
    --cc=hydrapolic@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=srn@prgmr.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.