Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751977AbbGLGIa (ORCPT ); Sun, 12 Jul 2015 02:08:30 -0400 Received: from www.linutronix.de ([62.245.132.108]:50389 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbbGLGI3 (ORCPT ); Sun, 12 Jul 2015 02:08:29 -0400 Date: Sun, 12 Jul 2015 08:08:21 +0200 (CEST) From: Thomas Gleixner To: Frederic Weisbecker cc: LKML , Peter Zijlstra , Chris Metcalf , Don Zickus , Ulrich Obergfell , Andrew Morton Subject: Re: [PATCH 2/4] smpboot: Make cleanup to mirror setup In-Reply-To: <1436629952-17291-3-git-send-email-fweisbec@gmail.com> Message-ID: References: <1436629952-17291-1-git-send-email-fweisbec@gmail.com> <1436629952-17291-3-git-send-email-fweisbec@gmail.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1289 Lines: 36 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/