WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-bugs

[Xen-bugs] [Bug 1616] CPU panic when running cpu offline

To: xen-bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-bugs] [Bug 1616] CPU panic when running cpu offline
From: bugzilla-daemon@xxxxxxxxxxxxxxxxxxx
Date: Tue, 1 Jun 2010 00:45:07 -0700
Delivery-date: Tue, 01 Jun 2010 00:45:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <bug-1616-3@xxxxxxxxxxxxxxxxxxxxxxxxxxx/bugzilla/>
List-help: <mailto:xen-bugs-request@lists.xensource.com?subject=help>
List-id: Xen Bugzilla <xen-bugs.lists.xensource.com>
List-post: <mailto:xen-bugs@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-bugs>, <mailto:xen-bugs-request@lists.xensource.com?subject=unsubscribe>
Reply-to: bugs@xxxxxxxxxxxxxxxxxx
Sender: xen-bugs-bounces@xxxxxxxxxxxxxxxxxxx
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1616


yunhong.jiang@xxxxxxxxx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Comment #2 from yunhong.jiang@xxxxxxxxx  2010-06-01 00:45 -------
For issue 2, CPU panic when running cpu offline, it should comes from the
periodic_timer.

When a CPU is pull down, cpu_disable_scheduler will remove the single shot
timer, but the periodic_timer is not migrated.
After the vcpu is scheduled on another pCPU later, and then schedule out from
that new pcpu, the stop_timer(&prev->periodic_timer) will try to access the
per_cpu strucutre, whic still poiting to the offlined CPU's per_cpu area and
will cause trouble. This should be caused by the per_cpu changes.

I try to migrate the periodic_timer also when cpu_disable_scheduler() and seems
it works. ï¼?comments the migration in cpu_disable_scheudler will trigger the
printk).
Seems on your side, the timer will always be triggered before schedule out?

--jyh

diff -r 96917cf25bf3 xen/common/schedule.c
--- a/xen/common/schedule.c     Fri May 28 10:54:07 2010 +0100
+++ b/xen/common/schedule.c     Tue Jun 01 15:35:21 2010 +0800
@@ -487,6 +487,15 @@ int cpu_disable_scheduler(unsigned int c
                 migrate_timer(&v->singleshot_timer, cpu_mig);
             }

+/*
+            if ( v->periodic_timer.cpu == cpu )
+            {
+                int cpu_mig = first_cpu(c->cpu_valid);
+                if ( cpu_mig == cpu )
+                    cpu_mig = next_cpu(cpu_mig, c->cpu_valid);
+                migrate_timer(&v->periodic_timer, cpu_mig);
+            }
+*/
             if ( v->processor == cpu )
             {
                 set_bit(_VPF_migrating, &v->pause_flags);
@@ -505,7 +514,10 @@ int cpu_disable_scheduler(unsigned int c
              * all locks.
              */
             if ( v->processor == cpu )
+            {
+                printk("we hit the EAGAIN here\n");
                 ret = -EAGAIN;
+            }
         }
     }
     return ret;
@@ -1005,6 +1017,11 @@ static void schedule(void)

     perfc_incr(sched_ctx);

+    if (prev->periodic_timer.cpu != smp_processor_id() &&
!cpu_online(prev->periodic_timer.cpu))
+    {
+        printk("I'm now at cpu %x, timer's cpu is %x\n", smp_processor_id(),
prev->periodic_timer.cpu);
+    }
+
     stop_timer(&prev->periodic_timer);

     /* Ensure that the domain has an up-to-date time base. */


-- 
Configure bugmail: 
http://bugzilla.xensource.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-bugs] [Bug 1616] CPU panic when running cpu offline, bugzilla-daemon <=