# HG changeset patch
# User iap10@xxxxxxxxxxxxxxxxxxxxx
# Node ID 050bf85fb870a7c6c8ad052229a3bd35bebaf802
# Parent 08d19da852c73c82eaa8c87b741d22adbcf9a710
Add "set_pte_at_sync" (integrated invlpg) in Linux i386/mm/highmem.c to improve
performance for domains with >900MB of memory.
Signed-off-by: ian@xxxxxxxxxxxxx
diff -r 08d19da852c7 -r 050bf85fb870
linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c Sat Aug 13 21:26:49 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/highmem.c Sat Aug 13 21:52:46 2005
@@ -41,8 +41,7 @@
if (!pte_none(*(kmap_pte-idx)))
BUG();
#endif
- set_pte(kmap_pte-idx, mk_pte(page, prot));
- __flush_tlb_one(vaddr);
+ set_pte_at_sync(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot));
return (void*) vaddr;
}
diff -r 08d19da852c7 -r 050bf85fb870
linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h Sat Aug
13 21:26:49 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h Sat Aug
13 21:52:46 2005
@@ -22,6 +22,17 @@
HYPERVISOR_update_va_mapping( (addr), (val), 0 ) )
{
set_pte(ptep, val);
+ }
+}
+
+inline static void set_pte_at_sync(struct mm_struct *mm, unsigned long addr,
+ pte_t *ptep, pte_t val )
+{
+ if ( ((mm != current->mm) && (mm != &init_mm)) ||
+ HYPERVISOR_update_va_mapping( (addr), (val), UVMF_INVLPG ) )
+ {
+ set_pte(ptep, val);
+ xen_invlpg(addr);
}
}
diff -r 08d19da852c7 -r 050bf85fb870
linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h Sat Aug
13 21:26:49 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/pgtable-3level.h Sat Aug
13 21:52:46 2005
@@ -76,6 +76,17 @@
HYPERVISOR_update_va_mapping( (addr), (val), 0 ) )
{
set_pte(ptep, val);
+ }
+}
+
+inline static void set_pte_at_sync(struct mm_struct *mm, unsigned long addr,
+ pte_t *ptep, pte_t val )
+{
+ if ( ((mm != current->mm) && (mm != &init_mm)) ||
+ HYPERVISOR_update_va_mapping( (addr), (val), UVMF_INVLPG ) )
+ {
+ set_pte(ptep, val);
+ xen_invlpg(addr);
}
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|