All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <George.Dunlap@eu.citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Anshul Makkar <anshul.makkar@citrix.com>
Subject: Re: [PATCH 3/4] xen: credit2: improve distribution of budget (for domains with caps)
Date: Wed, 28 Jun 2017 17:02:17 +0100	[thread overview]
Message-ID: <CAFLBxZbLpAZJ1ugxkmA8LzOWCRO9Bow-HJwuDcUYv-iv_Pk0dQ@mail.gmail.com> (raw)
In-Reply-To: <149692374138.9605.16027485611403582297.stgit@Solace.fritz.box>

On Thu, Jun 8, 2017 at 1:09 PM, Dario Faggioli
<dario.faggioli@citrix.com> wrote:
> Instead of letting the vCPU that for first tries to get

s/for//;

> some budget take it all (although temporarily), allow each
> vCPU to only get a specific quota of the total budget.
>
> This improves fairness, allows for more parallelism, and
> prevents vCPUs from not being able to get any budget (e.g.,
> because some other vCPU always comes before and gets it all)
> for one or more period, and hence starve (and couse troubles

* cause

> in guest kernels, such as livelocks, triggering ofwhatchdogs,

* 'of watchdogs' (missing space)

> etc.).
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> ---

> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> index 3f7b8f0..97efde8 100644
> --- a/xen/common/sched_credit2.c
> +++ b/xen/common/sched_credit2.c
> @@ -506,7 +506,7 @@ struct csched2_vcpu {
>
>      int credit;
>
> -    s_time_t budget;
> +    s_time_t budget, budget_quota;
>      struct list_head parked_elem;      /* On the parked_vcpus list   */
>
>      s_time_t start_time; /* When we were scheduled (used for credit) */
> @@ -1627,8 +1627,16 @@ static bool vcpu_try_to_get_budget(struct csched2_vcpu *svc)
>
>      if ( sdom->budget > 0 )
>      {
> -        svc->budget = sdom->budget;
> -        sdom->budget = 0;
> +        s_time_t budget;
> +
> +        /* Get our quote, if there's at least as much budget */

*quota

> @@ -2619,6 +2650,7 @@ csched2_dom_cntl(
>                      vcpu_schedule_unlock(lock, svc->vcpu);
>                  }
>              }
> +
>              sdom->cap = op->u.credit2.cap;

Since you'll be re-spinning, might as well move this into the previous
patch. :-)

Everything else looks good, so with those changes you can add:

Reviewed-by: George Dunlap <george.dunlap@citrix.com>

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

  reply	other threads:[~2017-06-28 16:02 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
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 [this message]
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=CAFLBxZbLpAZJ1ugxkmA8LzOWCRO9Bow-HJwuDcUYv-iv_Pk0dQ@mail.gmail.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=anshul.makkar@citrix.com \
    --cc=dario.faggioli@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.