KVM: Replace 'light_exits' stat with 'host_state_reload'
This is a little more accurate (since it counts actual reloads, not potential reloads), and reverses the sense of the statistic to measure a bad event like most of the other stats (e.g. we want to minimize all counters). Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
parent
d19a9cd275
commit
e1beb1d37c
4 changed files with 5 additions and 5 deletions
|
@ -246,7 +246,7 @@ struct kvm_stat {
|
||||||
u32 halt_wakeup;
|
u32 halt_wakeup;
|
||||||
u32 request_irq_exits;
|
u32 request_irq_exits;
|
||||||
u32 irq_exits;
|
u32 irq_exits;
|
||||||
u32 light_exits;
|
u32 host_state_reload;
|
||||||
u32 efer_reload;
|
u32 efer_reload;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -654,6 +654,7 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu)
|
||||||
struct vcpu_svm *svm = to_svm(vcpu);
|
struct vcpu_svm *svm = to_svm(vcpu);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
++vcpu->stat.host_state_reload;
|
||||||
for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++)
|
for (i = 0; i < NR_HOST_SAVE_USER_MSRS; i++)
|
||||||
wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]);
|
wrmsrl(host_save_user_msrs[i], svm->host_user_msrs[i]);
|
||||||
|
|
||||||
|
|
|
@ -463,6 +463,7 @@ static void vmx_load_host_state(struct vcpu_vmx *vmx)
|
||||||
if (!vmx->host_state.loaded)
|
if (!vmx->host_state.loaded)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
++vmx->vcpu.stat.host_state_reload;
|
||||||
vmx->host_state.loaded = 0;
|
vmx->host_state.loaded = 0;
|
||||||
if (vmx->host_state.fs_reload_needed)
|
if (vmx->host_state.fs_reload_needed)
|
||||||
load_fs(vmx->host_state.fs_sel);
|
load_fs(vmx->host_state.fs_sel);
|
||||||
|
|
|
@ -60,7 +60,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
|
||||||
{ "halt_wakeup", STAT_OFFSET(halt_wakeup) },
|
{ "halt_wakeup", STAT_OFFSET(halt_wakeup) },
|
||||||
{ "request_irq", STAT_OFFSET(request_irq_exits) },
|
{ "request_irq", STAT_OFFSET(request_irq_exits) },
|
||||||
{ "irq_exits", STAT_OFFSET(irq_exits) },
|
{ "irq_exits", STAT_OFFSET(irq_exits) },
|
||||||
{ "light_exits", STAT_OFFSET(light_exits) },
|
{ "host_state_reload", STAT_OFFSET(host_state_reload) },
|
||||||
{ "efer_reload", STAT_OFFSET(efer_reload) },
|
{ "efer_reload", STAT_OFFSET(efer_reload) },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
@ -1988,11 +1988,9 @@ again:
|
||||||
++vcpu->stat.request_irq_exits;
|
++vcpu->stat.request_irq_exits;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (!need_resched()) {
|
if (!need_resched())
|
||||||
++vcpu->stat.light_exits;
|
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (r > 0) {
|
if (r > 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue