lkml.org 
[lkml]   [2014]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] xen/smp: Use die_complete completion when taking CPU down

* Boris Ostrovsky <boris.ostrovsky@oracle.com> wrote:

> diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
> index 8650cdb..4da0008 100644
> --- a/arch/x86/xen/smp.c
> +++ b/arch/x86/xen/smp.c
> @@ -498,6 +498,7 @@ static int xen_cpu_disable(void)
> if (cpu == 0)
> return -EBUSY;
>
> + init_completion(&per_cpu(die_complete, smp_processor_id()));
> cpu_disable_common();
>
> load_cr3(swapper_pg_dir);
> @@ -510,6 +511,9 @@ static void xen_cpu_die(unsigned int cpu)
> current->state = TASK_UNINTERRUPTIBLE;
> schedule_timeout(HZ/10);
> }
> +
> + wait_for_completion_timeout(&per_cpu(die_complete, cpu), HZ);
> +
> xen_smp_intr_free(cpu);
> xen_uninit_lock_cpu(cpu);
> xen_teardown_timer(cpu);

So why not put it into cpu_disable_common() and do the same
change for native_cpu_disable()?

Likewise, the waiting bit should be put into a common function as
well (newly introduced, if need to be), we don't want to expose
internal x86 core data structures to the Xen guest code.

Thanks,

Ingo


\
 
 \ /
  Last update: 2014-10-16 10:21    [W:0.035 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site