xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: "Jiang, Yunhong" <yunhong.jiang@intel.com>,
	"Xu, Jiajun" <jiajun.xu@intel.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Biweekly VMX status report. Xen: #21438 & Xen0: #a3e7c7...
Date: Tue, 1 Jun 2010 10:30:32 +0100	[thread overview]
Message-ID: <C82A91C8.165A1%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <789F9655DD1B8F43B48D77C5D30659731E7EC8CA@shsmsx501.ccr.corp.intel.com>

On 01/06/2010 08:43, "Jiang, Yunhong" <yunhong.jiang@intel.com> wrote:

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

Which xen-unstable changeset are you testing? All timers should be
automatically migrated off a dead CPU and onto CPU0 by changeset 21424. Is
that not working okay for you?

 -- Keir

> 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@lists.xensource.com
>> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Keir Fraser
>> Sent: Tuesday, May 25, 2010 5:15 PM
>> To: Xu, Jiajun; xen-devel@lists.xensource.com
>> Subject: Re: [Xen-devel] Biweekly VMX status report. Xen: #21438 & Xen0:
>> #a3e7c7...
>> 
>> On 25/05/2010 10:13, "Keir Fraser" <keir.fraser@eu.citrix.com> 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@lists.xensource.com
>> http://lists.xensource.com/xen-devel

  reply	other threads:[~2010-06-01  9:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 15:51 Biweekly VMX status report. Xen: #21438 & Xen0: #a3e7c7 Xu, Jiajun
2010-05-24 16:53 ` Keir Fraser
2010-05-25  8:17   ` Xu, Jiajun
2010-05-25  8:27     ` Dulloor
2010-05-25  8:29       ` Xu, Jiajun
2010-05-26 13:48       ` Xu, Jiajun
2010-05-25  9:13     ` Keir Fraser
2010-05-25  9:15       ` Keir Fraser
2010-06-01  7:43         ` Jiang, Yunhong
2010-06-01  9:30           ` Keir Fraser [this message]
2010-06-02  7:28             ` Jiang, Yunhong
2010-06-02  8:01               ` Keir Fraser
2010-06-02  8:49                 ` Jiang, Yunhong
2010-06-02  9:24                 ` Jiang, Yunhong
2010-06-02  9:41                   ` Keir Fraser
2010-06-02 10:23                     ` Jiang, Yunhong
2010-06-02 12:17                       ` Keir Fraser
2010-06-02 13:33                         ` Jiang, Yunhong
2010-06-02 12:14                 ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C82A91C8.165A1%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=jiajun.xu@intel.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yunhong.jiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).