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-devel

RE: [Xen-devel] Biweekly VMX status report. Xen: #21438 & Xen0: #a3e7c7.

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "Xu, Jiajun" <jiajun.xu@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Biweekly VMX status report. Xen: #21438 & Xen0: #a3e7c7...
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Tue, 1 Jun 2010 15:43:28 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Tue, 01 Jun 2010 00:46:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C82153B2.15100%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C821534A.150F3%keir.fraser@xxxxxxxxxxxxx> <C82153B2.15100%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acr7WP6tLI1/MbF5Rx6MiSRtri82UQACJ+lgACA1w7AAAgVQywAAD39BAVwtyIA=
Thread-topic: [Xen-devel] Biweekly VMX status report. Xen: #21438 & Xen0: #a3e7c7...
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. */



--jyh

>-----Original Message-----
>From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Keir Fraser
>Sent: Tuesday, May 25, 2010 5:15 PM
>To: Xu, Jiajun; xen-devel@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [Xen-devel] Biweekly VMX status report. Xen: #21438 & Xen0:
>#a3e7c7...
>
>On 25/05/2010 10:13, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:
>
>>>>> 1. xen hypervisor hang when create guest on 32e platform
>>>>> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1617
>>>
>>> The bug occurs each time when I created the guest. I have attached the 
>>> serial
>>> output on the bugzilla.
>>
>> I haven't been able to reproduce this.
>>
>>>>> 2. CPU panic when running cpu offline
>>>>> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1616
>>>
>>> Xen will panic when I offline cpu each time. The log is also attached on the
>>> bugzilla.
>>
>> Nor this. I even installed 32-bit Xen to match your environment more
>> closely.
>
>I'm running xen-unstable:21447 by the way. I ran 64-bit Xen for testing (1)
>above, and both 64-bit and 32-bit Xen for testing (2).
>
> K.
>
>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel