[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Merged.



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 78b5e590be34ee3454d970321d7c2f3199a0de41
# Parent  d1e1d6493d1d30711338201065f88c1674357da7
# Parent  f887ddae2b03ab363278afc92225aa3bc320de5f
Merged.

diff -r d1e1d6493d1d -r 78b5e590be34 
linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32
--- a/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32       Thu Nov 
24 19:56:38 2005
+++ b/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_32       Thu Nov 
24 19:57:01 2005
@@ -35,7 +35,6 @@
 # CONFIG_CLEAN_COMPILE is not set
 CONFIG_BROKEN=y
 CONFIG_BROKEN_ON_SMP=y
-CONFIG_LOCK_KERNEL=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 
 #
@@ -125,8 +124,6 @@
 # CONFIG_HPET_TIMER is not set
 # CONFIG_HPET_EMULATE_RTC is not set
 # CONFIG_SMP is not set
-CONFIG_PREEMPT=y
-CONFIG_PREEMPT_BKL=y
 # CONFIG_X86_REBOOTFIXUPS is not set
 CONFIG_MICROCODE=y
 CONFIG_X86_CPUID=y
@@ -141,7 +138,6 @@
 # CONFIG_HIGHMEM64G is not set
 CONFIG_HIGHMEM=y
 CONFIG_MTRR=y
-CONFIG_HAVE_DEC_LOCK=y
 # CONFIG_REGPARM is not set
 CONFIG_X86_LOCAL_APIC=y
 CONFIG_X86_IO_APIC=y
@@ -1259,7 +1255,6 @@
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_PREEMPT is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
diff -r d1e1d6493d1d -r 78b5e590be34 
linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64
--- a/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64       Thu Nov 
24 19:56:38 2005
+++ b/linux-2.6-xen-sparse/arch/xen/configs/xen0_defconfig_x86_64       Thu Nov 
24 19:57:01 2005
@@ -90,7 +90,6 @@
 CONFIG_X86_GOOD_APIC=y
 # CONFIG_HPET_TIMER is not set
 # CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
 CONFIG_MICROCODE=y
 # CONFIG_X86_CPUID is not set
 CONFIG_SWIOTLB=y
diff -r d1e1d6493d1d -r 78b5e590be34 
linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32
--- a/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32       Thu Nov 
24 19:56:38 2005
+++ b/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32       Thu Nov 
24 19:57:01 2005
@@ -125,8 +125,6 @@
 CONFIG_SMP_ALTERNATIVES=y
 CONFIG_NR_CPUS=8
 # CONFIG_SCHED_SMT is not set
-CONFIG_PREEMPT=y
-CONFIG_PREEMPT_BKL=y
 # CONFIG_X86_REBOOTFIXUPS is not set
 CONFIG_X86_CPUID=y
 
@@ -550,7 +548,6 @@
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_PREEMPT is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
diff -r d1e1d6493d1d -r 78b5e590be34 
linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64
--- a/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64       Thu Nov 
24 19:56:38 2005
+++ b/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64       Thu Nov 
24 19:57:01 2005
@@ -92,7 +92,6 @@
 CONFIG_SMP=y
 CONFIG_NR_CPUS=8
 # CONFIG_SCHED_SMT is not set
-# CONFIG_PREEMPT is not set
 # CONFIG_MICROCODE is not set
 CONFIG_X86_CPUID=y
 # CONFIG_NUMA is not set
diff -r d1e1d6493d1d -r 78b5e590be34 
linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_32
--- a/linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_32        Thu Nov 
24 19:56:38 2005
+++ b/linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_32        Thu Nov 
24 19:57:01 2005
@@ -132,8 +132,6 @@
 CONFIG_SMP_ALTERNATIVES=y
 CONFIG_NR_CPUS=8
 # CONFIG_SCHED_SMT is not set
-CONFIG_PREEMPT=y
-CONFIG_PREEMPT_BKL=y
 # CONFIG_X86_REBOOTFIXUPS is not set
 CONFIG_MICROCODE=y
 CONFIG_X86_CPUID=m
@@ -2951,7 +2949,6 @@
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_PREEMPT=y
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_KOBJECT is not set
diff -r d1e1d6493d1d -r 78b5e590be34 
linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_64
--- a/linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_64        Thu Nov 
24 19:56:38 2005
+++ b/linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_64        Thu Nov 
24 19:57:01 2005
@@ -95,7 +95,6 @@
 CONFIG_SMP=y
 CONFIG_NR_CPUS=8
 # CONFIG_SCHED_SMT is not set
-# CONFIG_PREEMPT is not set
 CONFIG_MICROCODE=y
 # CONFIG_X86_CPUID is not set
 # CONFIG_NUMA is not set
diff -r d1e1d6493d1d -r 78b5e590be34 linux-2.6-xen-sparse/arch/xen/i386/Kconfig
--- a/linux-2.6-xen-sparse/arch/xen/i386/Kconfig        Thu Nov 24 19:56:38 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/Kconfig        Thu Nov 24 19:57:01 2005
@@ -415,17 +415,17 @@
          cost of slightly increased overhead in some places. If unsure say
          N here.
 
-config PREEMPT
-       bool "Preemptible Kernel"
-       help
-         This option reduces the latency of the kernel when reacting to
-         real-time or interactive events by allowing a low priority process to
-         be preempted even if it is in kernel mode executing a system call.
-         This allows applications to run more reliably even when the system is
-         under load.
-
-         Say Y here if you are building a kernel for a desktop, embedded
-         or real-time system.  Say N if you are unsure.
+#config PREEMPT
+#      bool "Preemptible Kernel"
+#      help
+#        This option reduces the latency of the kernel when reacting to
+#        real-time or interactive events by allowing a low priority process to
+#        be preempted even if it is in kernel mode executing a system call.
+#        This allows applications to run more reliably even when the system is
+#        under load.
+#
+#        Say Y here if you are building a kernel for a desktop, embedded
+#        or real-time system.  Say N if you are unsure.
 
 config PREEMPT_BKL
        bool "Preempt The Big Kernel Lock"
diff -r d1e1d6493d1d -r 78b5e590be34 
linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Thu Nov 24 19:56:38 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/pgtable.c   Thu Nov 24 19:57:01 2005
@@ -27,8 +27,9 @@
 #include <asm-xen/foreign_page.h>
 #include <asm/hypervisor.h>
 
-static void __pgd_pin(pgd_t *pgd);
-static void __pgd_unpin(pgd_t *pgd);
+static void pgd_test_and_unpin(pgd_t *pgd);
+#define suspend_disable        preempt_disable
+#define suspend_enable preempt_enable
 
 void show_mem(void)
 {
@@ -284,26 +285,23 @@
        BUG_ON(rc);
 #endif
 
-       if (!HAVE_SHARED_KERNEL_PMD)
-               spin_lock_irqsave(&pgd_lock, flags);
-
-       memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD,
-                       swapper_pg_dir + USER_PTRS_PER_PGD,
-                       (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
-
-       if (HAVE_SHARED_KERNEL_PMD)
-               return;
-
+       if (HAVE_SHARED_KERNEL_PMD) {
+               memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD,
+                      swapper_pg_dir + USER_PTRS_PER_PGD,
+                      (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
+               return;
+       }
+
+       memset(pgd, 0, PTRS_PER_PGD*sizeof(pgd_t));
+
+       spin_lock_irqsave(&pgd_lock, flags);
        pgd_list_add(pgd);
        spin_unlock_irqrestore(&pgd_lock, flags);
-       memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t));
 }
 
 void pgd_dtor(void *pgd, kmem_cache_t *cache, unsigned long unused)
 {
        unsigned long flags; /* can be called from interrupt context */
-
-       BUG_ON(test_bit(PG_pinned, &virt_to_page(pgd)->flags));
 
        if (HAVE_SHARED_KERNEL_PMD)
                return;
@@ -311,6 +309,8 @@
        spin_lock_irqsave(&pgd_lock, flags);
        pgd_list_del(pgd);
        spin_unlock_irqrestore(&pgd_lock, flags);
+
+       pgd_test_and_unpin(pgd);
 }
 
 pgd_t *pgd_alloc(struct mm_struct *mm)
@@ -318,7 +318,7 @@
        int i = 0;
        pgd_t *pgd = kmem_cache_alloc(pgd_cache, GFP_KERNEL);
 
-       BUG_ON(test_bit(PG_pinned, &virt_to_page(pgd)->flags));
+       pgd_test_and_unpin(pgd);
 
        if (PTRS_PER_PMD == 1 || !pgd)
                return pgd;
@@ -345,7 +345,11 @@
                pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
                if (!pmd)
                        goto out_oom;
+               suspend_disable();
+               if (test_bit(PG_pinned, &virt_to_page(pgd)->flags))
+                       make_lowmem_page_readonly(pmd);
                set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
+               suspend_enable();
        }
        return pgd;
 
@@ -360,23 +364,28 @@
 {
        int i;
 
-       if (test_bit(PG_pinned, &virt_to_page(pgd)->flags))
-               __pgd_unpin(pgd);
+       suspend_disable();
+       pgd_test_and_unpin(pgd);
 
        /* in the PAE case user pgd entries are overwritten before usage */
        if (PTRS_PER_PMD > 1) {
                for (i = 0; i < USER_PTRS_PER_PGD; ++i) {
                        pmd_t *pmd = (void *)__va(pgd_val(pgd[i])-1);
+                       set_pgd(&pgd[i], __pgd(0));
                        make_lowmem_page_writable(pmd);
                        kmem_cache_free(pmd_cache, pmd);
                }
                if (!HAVE_SHARED_KERNEL_PMD) {
                        pmd_t *pmd = (void 
*)__va(pgd_val(pgd[USER_PTRS_PER_PGD])-1);
+                       set_pgd(&pgd[USER_PTRS_PER_PGD], __pgd(0));
                        make_lowmem_page_writable(pmd);
                        memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t));
                        kmem_cache_free(pmd_cache, pmd);
                }
        }
+
+       suspend_enable();
+
        /* in the non-PAE case, free_pgtables() clears user pgd entries */
        kmem_cache_free(pgd_cache, pgd);
 }
@@ -501,6 +510,9 @@
 
 static void __pgd_pin(pgd_t *pgd)
 {
+       /* PAE PGDs with no kernel PMD cannot be pinned. Bail right now. */
+       if ((PTRS_PER_PMD > 1) && pgd_none(pgd[USER_PTRS_PER_PGD]))
+               return;
        pgd_walk(pgd, PAGE_KERNEL_RO);
        xen_pgd_pin(__pa(pgd));
        set_bit(PG_pinned, &virt_to_page(pgd)->flags);
@@ -511,6 +523,14 @@
        xen_pgd_unpin(__pa(pgd));
        pgd_walk(pgd, PAGE_KERNEL);
        clear_bit(PG_pinned, &virt_to_page(pgd)->flags);
+}
+
+static void pgd_test_and_unpin(pgd_t *pgd)
+{
+       suspend_disable();
+       if (test_bit(PG_pinned, &virt_to_page(pgd)->flags))
+               __pgd_unpin(pgd);
+       suspend_enable();
 }
 
 void mm_pin(struct mm_struct *mm)
diff -r d1e1d6493d1d -r 78b5e590be34 
linux-2.6-xen-sparse/arch/xen/x86_64/Kconfig
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/Kconfig      Thu Nov 24 19:56:38 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/Kconfig      Thu Nov 24 19:57:01 2005
@@ -224,21 +224,21 @@
 
          If you don't know what to do here, say N.
 
-config PREEMPT
-       bool "Preemptible Kernel"
-       ---help---
-         This option reduces the latency of the kernel when reacting to
-         real-time or interactive events by allowing a low priority process to
-         be preempted even if it is in kernel mode executing a system call.
-         This allows applications to run more reliably even when the system is
-         under load. On contrary it may also break your drivers and add
-         priority inheritance problems to your system. Don't select it if
-         you rely on a stable system or have slightly obscure hardware.
-         It's also not very well tested on x86-64 currently.
-         You have been warned.
-
-         Say Y here if you are feeling brave and building a kernel for a
-         desktop, embedded or real-time system.  Say N if you are unsure.
+#config PREEMPT
+#      bool "Preemptible Kernel"
+#      ---help---
+#        This option reduces the latency of the kernel when reacting to
+#        real-time or interactive events by allowing a low priority process to
+#        be preempted even if it is in kernel mode executing a system call.
+#        This allows applications to run more reliably even when the system is
+#        under load. On contrary it may also break your drivers and add
+#        priority inheritance problems to your system. Don't select it if
+#        you rely on a stable system or have slightly obscure hardware.
+#        It's also not very well tested on x86-64 currently.
+#        You have been warned.
+#
+#        Say Y here if you are feeling brave and building a kernel for a
+#        desktop, embedded or real-time system.  Say N if you are unsure.
 
 config SCHED_SMT
        bool "SMT (Hyperthreading) scheduler support"
diff -r d1e1d6493d1d -r 78b5e590be34 xen/common/grant_table.c
--- a/xen/common/grant_table.c  Thu Nov 24 19:56:38 2005
+++ b/xen/common/grant_table.c  Thu Nov 24 19:57:01 2005
@@ -726,10 +726,11 @@
              unlikely(e->tot_pages >= e->max_pages) ||
              unlikely(!gnttab_prepare_for_transfer(e, d, gop.ref)) )
         {
-            DPRINTK("gnttab_transfer: Transferee has no reservation headroom "
-                    "(%d,%d) or provided a bad grant ref (%08x) or "
-                    "is dying (%lx)\n",
-                    e->tot_pages, e->max_pages, gop.ref, e->domain_flags);
+            if ( !test_bit(_DOMF_dying, &e->domain_flags) )
+                DPRINTK("gnttab_transfer: Transferee has no reservation "
+                        "headroom (%d,%d) or provided a bad grant ref (%08x) "
+                        "or is dying (%lx)\n",
+                        e->tot_pages, e->max_pages, gop.ref, e->domain_flags);
             spin_unlock(&e->page_alloc_lock);
             put_domain(e);
             (void)__put_user(GNTST_general_error, &uop[i].status);
diff -r d1e1d6493d1d -r 78b5e590be34 xen/include/asm-x86/flushtlb.h
--- a/xen/include/asm-x86/flushtlb.h    Thu Nov 24 19:56:38 2005
+++ b/xen/include/asm-x86/flushtlb.h    Thu Nov 24 19:57:01 2005
@@ -97,7 +97,7 @@
 extern void flush_tlb_all_pge(void);
 extern void __flush_tlb_mask(cpumask_t mask, unsigned long va);
 #define flush_tlb_mask(mask)       __flush_tlb_mask(mask,FLUSHVA_ALL)
-#define flush_tlb_one_mask(mask,v) __flush_tlb_mask(mask,v)
+#define flush_tlb_one_mask(mask,v) __flush_tlb_mask(mask,(unsigned long)(v))
 #endif
 
 #endif /* __FLUSHTLB_H__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.