All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: George Dunlap <george.dunlap@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Anshul Makkar <anshul.makkar@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Jan Beulich <jbeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 1/4] xen: credit2: implement utilization cap
Date: Thu, 29 Jun 2017 12:09:54 +0200	[thread overview]
Message-ID: <1498730994.7288.13.camel@citrix.com> (raw)
In-Reply-To: <CAFLBxZa4CQDk_YCrm3K22gDS7ddEfE8bNigEYWjNtESeoVbG=w@mail.gmail.com>


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

On Wed, 2017-06-28 at 20:05 +0100, George Dunlap wrote:
> On Wed, Jun 28, 2017 at 3:56 PM, Dario Faggioli
> <dario.faggioli@citrix.com> wrote:
> > 
> > In the case you describe, at 2T, with budget -C, the first round of
> > the
> > loop will make the budget 0, and set the next replenishment to 3T.
> > As
> > you say, since budget is 0, and 0 is <= than 0, we stay in the loop
> > for
> > another round, which sets the budget to C, and the next
> > replenishment
> > to 4T.
> 
> Ah, right -- I did notice that next_repl was being moved forward each
> iteration too, but didn't connect that it would mean you'd end up
> going for 2T without calling repl_sdom_budget() again.
> 
> So I'm convinced that this behavior won't break the credit system,
> but
> I'm not sure why it's an advantage over just having the domain "sit
> out" this time period.
> 
I think they're just two different possible implementations, and it's
hard to tell, in general, which one is better and which one is worse

Depending on very specific characteristics of the workload, in
combination with what actually caused the specific occurrence of such a
big overrun, and maybe even other factors, either one may behave better
or worse.

E.g., if the vcpu is "greedy", and always tries to run, as soon as it
has some budget, the difference between the two solution is _where_ we
put the "sitting period".

> Did you actually see this happen in practice on a regular basis
> during
> your tests, or is this mostly a hypothetical situation we're talking
> about here?
> 
It's a safety catch. It really should not happen except from bugs or
unless something is really wrong (e.g., in HW). It may happen more
regularly if the user manages to set a budget that is really small,
compared to the actual resolution of the budget enforcing logic (which
is whatever time granularity we use for timers, in that specific host).

There are measures already in place to try to prevent that to happen,
but I probably can add some more... including a WARN() in this very
case.

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

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

  reply	other threads:[~2017-06-29 10:10 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08 12:08 [PATCH 0/4] xen/tools: Credit2: implement caps Dario Faggioli
2017-06-08 12:08 ` [PATCH 1/4] xen: credit2: implement utilization cap Dario Faggioli
2017-06-12 11:16   ` Anshul Makkar
2017-06-12 13:19     ` Dario Faggioli
2017-06-13 16:07       ` Anshul Makkar
2017-06-13 21:13         ` Dario Faggioli
2017-06-15 16:16           ` Anshul Makkar
2017-06-22 16:55   ` George Dunlap
2017-06-23 16:19     ` Dario Faggioli
2017-06-28 14:28       ` George Dunlap
2017-06-28 14:56         ` Dario Faggioli
2017-06-28 19:05           ` George Dunlap
2017-06-29 10:09             ` Dario Faggioli [this message]
2017-07-25 14:34               ` George Dunlap
2017-07-25 17:29                 ` Dario Faggioli
2017-07-25 15:08   ` George Dunlap
2017-07-25 16:05     ` Dario Faggioli
2017-06-08 12:08 ` [PATCH 2/4] xen: credit2: allow to set and get " Dario Faggioli
2017-06-28 15:19   ` George Dunlap
2017-06-29 10:21     ` Dario Faggioli
2017-06-29  7:39   ` Alan Robinson
2017-06-29  8:26     ` George Dunlap
2017-06-08 12:09 ` [PATCH 3/4] xen: credit2: improve distribution of budget (for domains with caps) Dario Faggioli
2017-06-28 16:02   ` George Dunlap
2017-06-08 12:09 ` [PATCH 4/4] libxl/xl: allow to get and set cap on Credit2 Dario Faggioli
2017-06-09 10:41   ` Wei Liu
2017-06-28 18:43   ` George Dunlap
2017-06-29 10:22     ` 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=1498730994.7288.13.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anshul.makkar@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=wei.liu2@citrix.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.