[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] xen:rtds:Fix bug in budget accounting



On Fri, Oct 21, 2016 at 10:11 PM, Meng Xu <mengxu@xxxxxxxxxxxxx> wrote:
> Bug scenario:
> While a VCPU is running on a core, it may misses its deadline.
> Then repl_timer_handler() will update the VCPU period and deadline.
> The VCPU may have high priority with the new deadline and repl_timer_handler()
> decides to keep the VCPU running on the core, but with new period and 
> deadline.
> However, the budget enforcement timer for the previous period is still armed.
> When rt_schedule() is called in the new period to enforce the budget
> for the previous period, current burn_budget() will deduct the time spent
> in previous period from the budget in current period, which is incorrect.

In order to quickly show the impact of the bug, we have a quick test
case to demonstrate it.
The test case is at https://github.com/PennPanda/dagaen
It is a simple Linux module, which keeps invoking
HYPERVISOR_xen_version for thousands of times and measure the latency.

The bug will cause the maximum latency equal to the VCPU's period.
With the patch, the maximum latency is within tens of microseconds.
(On my computer with 2.1GHz, the maximum latency is 20us.)

Thanks,

Meng
-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.