projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb25918
)
KVM: MMU: lower the aduit frequency
author
Xiao Guangrong
<
[email protected]
>
Mon, 30 Aug 2010 10:26:33 +0000
(18:26 +0800)
committer
Avi Kivity
<
[email protected]
>
Sun, 24 Oct 2010 08:51:59 +0000
(10:51 +0200)
The audit is very high overhead, so we need lower the frequency to assure
the guest is running.
Signed-off-by: Xiao Guangrong <
[email protected]
>
Signed-off-by: Avi Kivity <
[email protected]
>
arch/x86/kvm/mmu_audit.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/mmu_audit.c
b/arch/x86/kvm/mmu_audit.c
index 3bde186409bfd9e2b5d65764519d3f02e93dbfe7..bd2b1be7066ea891b9826cd88a59b138036fec29 100644
(file)
--- a/
arch/x86/kvm/mmu_audit.c
+++ b/
arch/x86/kvm/mmu_audit.c
@@
-17,6
+17,8
@@
*
*/
+#include <linux/ratelimit.h>
+
static const char *audit_msg;
typedef void (*inspect_spte_fn) (struct kvm_vcpu *vcpu, u64 *sptep, int level);
@@
-228,6
+230,11
@@
static void audit_vcpu_spte(struct kvm_vcpu *vcpu)
static void kvm_mmu_audit(void *ignore, struct kvm_vcpu *vcpu, int audit_point)
{
+ static DEFINE_RATELIMIT_STATE(ratelimit_state, 5 * HZ, 10);
+
+ if (!__ratelimit(&ratelimit_state))
+ return;
+
audit_msg = audit_point_name[audit_point];
audit_all_active_sps(vcpu->kvm);
audit_vcpu_spte(vcpu);