From: Wei Liu <wei.liu2@citrix.com>
To: Meng Xu <mengxu@cis.upenn.edu>
Cc: Wei Liu <wei.liu2@citrix.com>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Haoran Li <lihaoran@wustl.edu>,
Dario Faggioli <dario.faggioli@citrix.com>,
Linh Thi Xuan Phan <linhphan@cis.upenn.edu>,
Meng Xu <xumengpanda@gmail.com>,
xen-devel@lists.xenproject.org,
Dagaen Golomb <dgolomb@seas.upenn.edu>
Subject: Re: [PATCH] xen:rtds:fix bug in accounting budget
Date: Wed, 19 Oct 2016 16:45:20 +0100 [thread overview]
Message-ID: <20161019154520.GK2639@citrix.com> (raw)
In-Reply-To: <1476890041-4248-1-git-send-email-mengxu@cis.upenn.edu>
On Wed, Oct 19, 2016 at 11:13:54AM -0400, Meng Xu wrote:
> The bug is introduced in Xen 4.7 when we converted RTDS scheduler
> from quantum-driven model to event-driven model.
> We assumed rt_schedule() is always called for a VCPU
> before the VCPUs budget replenished handler.
> This assumption does not hold, when system is overloaded, or
> when the VCPU budget is almost equal its period.
>
> Buggy behavior:
> 1) A VCPU may get less budget that assigned in a period.
> 2) A full capacity VCPU, i.e., a VCPU whose period is equal to budget,
> may not get any budget in some period.
>
> Bug analysis:
> 1) A VCPU deadline can be fast-forwarded by more than one period.
> However, the VCPU last_start time was not updated immediately.
> If rt_schedule() is called after rt_update_deadline(), which happens
> when VCPU budget is equal to period or when VCPU has deadline miss,
> burn_budget() will burn the budget that was just replenished,
> although the replenished budget should be used in the most recent period only.
>
> We should update VCPU last_start time to the start of the current period
> when rt_update_deadline() updates a VCPU period.
>
> 2) When a full capacity VCPU depletes its budget and is context switching out,
> but has not updated the cores current running VCPU,
> the budget replenish timer may be triggerred.
> The replenish handler failed to re-schedule the full capacity VCPU
> because it thought the VCPU is running.
>
> When a VCPU budget is replenished, we try to tickle a CPU.
> When we find a core for a VCPU to tickle and the VCPU is context switching out,
> we will always tickle the core where the VCPU was running,
> if the VCPU cannot find another core to tickle
>
> This bug was reported by Dagaen Golomb
>
> Signed-off-by: Meng Xu
You missed you email address here.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-10-19 15:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 15:13 [PATCH] xen:rtds:fix bug in accounting budget Meng Xu
2016-10-19 15:30 ` Meng Xu
2016-10-19 15:45 ` Wei Liu [this message]
2016-10-19 15:55 ` Meng Xu
2016-10-21 17:36 ` Dario Faggioli
2016-10-21 20:58 ` Meng Xu
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=20161019154520.GK2639@citrix.com \
--to=wei.liu2@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=dario.faggioli@citrix.com \
--cc=dgolomb@seas.upenn.edu \
--cc=lihaoran@wustl.edu \
--cc=linhphan@cis.upenn.edu \
--cc=mengxu@cis.upenn.edu \
--cc=xen-devel@lists.xenproject.org \
--cc=xumengpanda@gmail.com \
/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.