lkml.org 
[lkml]   [2015]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] smpboot: Make cleanup to mirror setup
On Sat, 11 Jul 2015, Frederic Weisbecker wrote:
> --- a/kernel/smpboot.c
> +++ b/kernel/smpboot.c
> @@ -113,7 +113,8 @@ static int smpboot_thread_fn(void *data)
> if (kthread_should_stop()) {
> __set_current_state(TASK_RUNNING);
> preempt_enable();
> - if (ht->cleanup)
> + /* cleanup must mirror setup */
> + if (ht->cleanup && td->status != HP_THREAD_NONE)
> ht->cleanup(td->cpu, cpu_online(td->cpu));
> kfree(td);
> return 0;
> @@ -259,15 +260,6 @@ static void smpboot_destroy_threads(struct smp_hotplug_thread *ht)
> {
> unsigned int cpu;
>
> - /* Unpark any threads that were voluntarily parked. */
> - for_each_cpu_not(cpu, ht->cpumask) {
> - if (cpu_online(cpu)) {
> - struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu);
> - if (tsk)
> - kthread_unpark(tsk);
> - }
> - }
> -
> /* We need to destroy also the parked threads of offline cpus */
> for_each_possible_cpu(cpu) {
> struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu);

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>


\
 
 \ /
  Last update: 2015-07-12 08:21    [W:0.046 / U:4.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site