OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e58cfe
)
Revert "KVM: Avoid useless memory write when possible"
author
Avi Kivity
<avi@qumranet.com>
Mon, 23 Jul 2007 15:33:14 +0000
(18:33 +0300)
committer
Avi Kivity
<avi@qumranet.com>
Wed, 25 Jul 2007 11:30:56 +0000
(14:30 +0300)
This reverts commit
a3c870bdce4d34332ebdba7eb9969592c4c6b243
. While it
does save useless updates, it (probably) defeats the fork detector, causing
a massive performance loss.
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c
patch
|
blob
|
history
diff --git
a/drivers/kvm/kvm_main.c
b/drivers/kvm/kvm_main.c
index
46efbe7
..
a8d8db8
100644
(file)
--- a/
drivers/kvm/kvm_main.c
+++ b/
drivers/kvm/kvm_main.c
@@
-1070,10
+1070,8
@@
static int emulator_write_phys(struct kvm_vcpu *vcpu, gpa_t gpa,
return 0;
mark_page_dirty(vcpu->kvm, gpa >> PAGE_SHIFT);
virt = kmap_atomic(page, KM_USER0);
- if (memcmp(virt + offset_in_page(gpa), val, bytes)) {
- kvm_mmu_pte_write(vcpu, gpa, virt + offset, val, bytes);
- memcpy(virt + offset_in_page(gpa), val, bytes);
- }
+ kvm_mmu_pte_write(vcpu, gpa, virt + offset, val, bytes);
+ memcpy(virt + offset_in_page(gpa), val, bytes);
kunmap_atomic(virt, KM_USER0);
return 1;
}