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

Re: [Xen-devel] Regression introduced with 14e568e78f6f80ca1e27256641ddf524c7dbdc51 (stop_machine: Use smpboot threads)



Tuesday, February 26, 2013, 6:44:33 PM, you wrote:

> On Tue, 26 Feb 2013, Sander Eikelenboom wrote:
>> Tuesday, February 26, 2013, 1:36:36 PM, you wrote:
>> > On Fri, 22 Feb 2013, Konrad Rzeszutek Wilk wrote:
>> >> 
>> >> I don't know if this is b/c the Xen code is missing something or
>> >> expects something that never happend. I hadn't looked at your
>> >> patch in any detail (was going to do that on Monday).
>> >> 
>> >> Either way, if I boot a HVM guest with PV extensions (aka PVHVM)
>> 
>> Hmm i'm seeing this booting on baremetal as well.
>> (see http://lkml.indiana.edu/hypermail/linux/kernel/1302.3/00836.html)

> Ok. I decoded it with the help of Konrad. Does the patch below work
> for you as well?

Did a few reboots and yes it seems to work here as well !
Thx

--
Sander

> Thanks,

>         tglx

> Index: linux-2.6/include/linux/smpboot.h
> ===================================================================
> --- linux-2.6.orig/include/linux/smpboot.h
> +++ linux-2.6/include/linux/smpboot.h
> @@ -24,6 +24,9 @@ struct smpboot_thread_data;
>   *                     parked (cpu offline)
>   * @unpark:            Optional unpark function, called when the thread is
>   *                     unparked (cpu online)
> + * @pre_unpark:                Optional unpark function, called before the 
> thread is
> + *                     unparked (cpu online). This is not guaranteed to be
> + *                     called on the target cpu of the thread. Careful!
>   * @selfparking:       Thread is not parked by the park function.
>   * @thread_comm:       The base name of the thread
>   */
> @@ -37,6 +40,7 @@ struct smp_hotplug_thread {
>         void                            (*cleanup)(unsigned int cpu, bool 
> online);
>         void                            (*park)(unsigned int cpu);
>         void                            (*unpark)(unsigned int cpu);
> +       void                            (*pre_unpark)(unsigned int cpu);
>         bool                            selfparking;
>         const char                      *thread_comm;
>  };
> Index: linux-2.6/kernel/smpboot.c
> ===================================================================
> --- linux-2.6.orig/kernel/smpboot.c
> +++ linux-2.6/kernel/smpboot.c
> @@ -209,6 +209,8 @@ static void smpboot_unpark_thread(struct
>  {
>         struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu);
>  
+       if (ht->>pre_unpark)
+               ht->>pre_unpark(cpu);
>         kthread_unpark(tsk);
>  }
>  
> Index: linux-2.6/kernel/stop_machine.c
> ===================================================================
> --- linux-2.6.orig/kernel/stop_machine.c
> +++ linux-2.6/kernel/stop_machine.c
> @@ -336,7 +336,7 @@ static struct smp_hotplug_thread cpu_sto
>         .create                 = cpu_stop_create,
>         .setup                  = cpu_stop_unpark,
>         .park                   = cpu_stop_park,
> -       .unpark                 = cpu_stop_unpark,
> +       .pre_unpark             = cpu_stop_unpark,
>         .selfparking            = true,
>  };
>  



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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