Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
static inline int
__csched_vcpu_is_cache_hot(struct vcpu *v)
{
- int hot = ((NOW() - v->runstate.state_entry_time) <
+ int hot = ((NOW() - v->last_run_time) <
((uint64_t)vcpu_migration_delay * 1000u));
if ( hot )
(test_bit(_VPF_blocked, &prev->pause_flags) ? RUNSTATE_blocked :
(vcpu_runnable(prev) ? RUNSTATE_runnable : RUNSTATE_offline)),
now);
+ prev->last_run_time = now;
ASSERT(next->runstate.state != RUNSTATE_running);
vcpu_runstate_change(next, RUNSTATE_running, now);
} runstate_guest; /* guest address */
#endif
+ /* last time when vCPU is scheduled out */
+ uint64_t last_run_time;
+
/* Has the FPU been initialised? */
bool_t fpu_initialised;
/* Has the FPU been used since it was last saved? */