Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 153977 Details for
Bug 236929
[RHEL4 Xen]: Suspend/resume failure under load
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
PATCH 3 (revised again): Fix cpu_hotplug_lock deadly embrace
linux-2.6.9-xen-hotplug-suspend-resume3.patch (text/plain), 4.61 KB, created by
Chris Lalancette
on 2007-05-02 19:17:34 UTC
(
hide
)
Description:
PATCH 3 (revised again): Fix cpu_hotplug_lock deadly embrace
Filename:
MIME Type:
Creator:
Chris Lalancette
Created:
2007-05-02 19:17:34 UTC
Size:
4.61 KB
patch
obsolete
>diff -urp linux-2.6.9.hotplug-cleanup/drivers/xen/core/cpu_hotplug.c linux-2.6.9/drivers/xen/core/cpu_hotplug.c >--- linux-2.6.9.hotplug-cleanup/drivers/xen/core/cpu_hotplug.c 2007-04-30 10:02:06.000000000 -0400 >+++ linux-2.6.9/drivers/xen/core/cpu_hotplug.c 2007-04-30 10:03:43.000000000 -0400 >@@ -122,30 +122,19 @@ arch_initcall(setup_vcpu_hotplug_event); > > int smp_suspend(void) > { >- int i, err; >- >- lock_cpu_hotplug(); >- >- /* >- * Take all other CPUs offline. We hold the hotplug mutex to >- * avoid other processes bringing up CPUs under our feet. >- */ >- while (num_online_cpus() > 1) { >- unlock_cpu_hotplug(); >- for_each_online_cpu(i) { >- if (i == 0) >- continue; >- err = cpu_down(i); >- if (err) { >- printk(KERN_CRIT "Failed to take all CPUs " >- "down: %d.\n", err); >- for_each_possible_cpu(i) >- vcpu_hotplug(i); >- return err; >- } >- } >- lock_cpu_hotplug(); >- } >+ int cpu, err; >+ for_each_online_cpu(cpu) { >+ if (cpu == 0) >+ continue; >+ err = cpu_down(cpu); >+ if (err) { >+ printk(KERN_CRIT "Failed to take all CPUs " >+ "down: %d.\n", err); >+ for_each_possible_cpu(cpu) >+ vcpu_hotplug(cpu); >+ return err; >+ } >+ } > > return 0; > } >@@ -155,11 +144,6 @@ void smp_resume(void) > int cpu; > > for_each_possible_cpu(cpu) >- cpu_initialize_context(cpu); >- >- unlock_cpu_hotplug(); >- >- for_each_possible_cpu(cpu) > vcpu_hotplug(cpu); > } > >diff -urp linux-2.6.9.hotplug-cleanup/drivers/xen/core/reboot.c linux-2.6.9/drivers/xen/core/reboot.c >--- linux-2.6.9.hotplug-cleanup/drivers/xen/core/reboot.c 2007-04-30 09:54:59.000000000 -0400 >+++ linux-2.6.9/drivers/xen/core/reboot.c 2007-04-30 10:03:43.000000000 -0400 >@@ -118,6 +118,10 @@ static void post_suspend(void) > extern unsigned long *pfn_to_mfn_frame_list_list; > extern unsigned long *pfn_to_mfn_frame_list[]; > >+#ifdef CONFIG_SMP >+ cpu_initialized_map = cpu_online_map; >+#endif >+ > set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info); > > HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO); >diff -urp linux-2.6.9.hotplug-cleanup/drivers/xen/core/smpboot.c linux-2.6.9/drivers/xen/core/smpboot.c >--- linux-2.6.9.hotplug-cleanup/drivers/xen/core/smpboot.c 2007-04-30 10:02:06.000000000 -0400 >+++ linux-2.6.9/drivers/xen/core/smpboot.c 2007-04-30 10:03:43.000000000 -0400 >@@ -45,8 +45,6 @@ extern void cpu_idle(void); > > extern void fixup_irqs(cpumask_t); > >-extern cpumask_t cpu_initialized; >- > /* Number of siblings per CPU package */ > int smp_num_siblings = 1; > int phys_proc_id[NR_CPUS]; /* Package ID of each logical CPU */ >@@ -58,6 +56,7 @@ cpumask_t cpu_online_map; > EXPORT_SYMBOL(cpu_online_map); > cpumask_t cpu_possible_map; > EXPORT_SYMBOL(cpu_possible_map); >+cpumask_t cpu_initialized_map; > > struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; > EXPORT_SYMBOL(cpu_data); >@@ -173,7 +172,7 @@ static void cpu_bringup_and_idle(void) > cpu_idle(); > } > >-void cpu_initialize_context(unsigned int cpu) >+static void cpu_initialize_context(unsigned int cpu) > { > vcpu_guest_context_t ctxt; > struct task_struct *idle = idle_task(cpu); >@@ -183,7 +182,7 @@ void cpu_initialize_context(unsigned int > struct Xgt_desc_struct *gdt_descr = &cpu_gdt_descr[cpu]; > #endif > >- if (cpu == 0) >+ if (cpu_test_and_set(cpu, cpu_initialized_map)) > return; > > memset(&ctxt, 0, sizeof(ctxt)); >@@ -271,6 +270,8 @@ void __init smp_prepare_cpus(unsigned in > > xen_smp_intr_init(0); > >+ cpu_initialized_map = cpumask_of_cpu(0); >+ > /* Restrict the possible_map according to max_cpus. */ > while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) { > for (cpu = NR_CPUS-1; !cpu_isset(cpu, cpu_possible_map); cpu--) >@@ -432,6 +433,8 @@ int __devinit __cpu_up(unsigned int cpu) > if (rc) > return rc; > >+ cpu_initialize_context(cpu); >+ > #ifdef CONFIG_SMP_ALTERNATIVES > if (num_online_cpus() == 1) > prepare_for_smp(); >diff -urp linux-2.6.9.hotplug-cleanup/include/xen/cpu_hotplug.h linux-2.6.9/include/xen/cpu_hotplug.h >--- linux-2.6.9.hotplug-cleanup/include/xen/cpu_hotplug.h 2007-04-30 09:54:59.000000000 -0400 >+++ linux-2.6.9/include/xen/cpu_hotplug.h 2007-04-30 10:03:43.000000000 -0400 >@@ -4,14 +4,15 @@ > #include <linux/kernel.h> > #include <linux/cpumask.h> > >-#if defined(CONFIG_HOTPLUG_CPU) >- >-#if defined(CONFIG_X86) >-void cpu_initialize_context(unsigned int cpu); >+#if defined(CONFIG_X86) && defined(CONFIG_SMP) >+extern cpumask_t cpu_initialized_map; >+#define cpu_set_initialized(cpu) cpu_set(cpu, cpu_initialized_map) > #else >-#define cpu_initialize_context(cpu) ((void)0) >+#define cpu_set_initialized(cpu) ((void)0) > #endif > >+#if defined(CONFIG_HOTPLUG_CPU) >+ > int cpu_up_check(unsigned int cpu); > void init_xenbus_allowed_cpumask(void); > int smp_suspend(void);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236929
:
153275
|
153276
|
153277
|
153278
|
153350
|
153821
|
153881
|
153962
| 153977