[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] schedule: mask out XEN_RUNSTATE_UPDATE from state entry time
From: Andrii Anisov <andrii_anisov@xxxxxxxx> Using XEN_RUNSTATE_UPDATE mask during the process of copying runstate values to guest causes runstate entry time to be eventually considered negative on a calculation of the time delta. So the XEN_RUNSTATE_UPDATE should be masked out during the calculation of the time spent in the particular runstate. Signed-off-by: Andrii Anisov <andrii_anisov@xxxxxxxx> --- xen/common/schedule.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 25f6ab3..f4f1a81 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -182,7 +182,9 @@ static inline void vcpu_runstate_change( trace_runstate_change(v, new_state); - delta = new_entry_time - v->runstate.state_entry_time; + delta = new_entry_time - + (v->runstate.state_entry_time & ~XEN_RUNSTATE_UPDATE); + if ( delta > 0 ) { v->runstate.time[v->runstate.state] += delta; -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |