Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752364AbbKYVRW (ORCPT ); Wed, 25 Nov 2015 16:17:22 -0500 Received: from www.linutronix.de ([62.245.132.108]:33522 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751438AbbKYVRR (ORCPT ); Wed, 25 Nov 2015 16:17:17 -0500 Date: Wed, 25 Nov 2015 22:16:16 +0100 (CET) From: Thomas Gleixner To: Petr Mladek cc: Andrew Morton , Oleg Nesterov , Tejun Heo , Ingo Molnar , Peter Zijlstra , Steven Rostedt , "Paul E. McKenney" , Josh Triplett , Linus Torvalds , Jiri Kosina , Borislav Petkov , Michal Hocko , linux-mm@kvack.org, Vlastimil Babka , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 02/22] kthread/smpboot: Do not park in kthread_create_on_cpu() In-Reply-To: <1447853127-3461-3-git-send-email-pmladek@suse.com> Message-ID: References: <1447853127-3461-1-git-send-email-pmladek@suse.com> <1447853127-3461-3-git-send-email-pmladek@suse.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: 1180 Lines: 27 On Wed, 18 Nov 2015, Petr Mladek wrote: > kthread_create_on_cpu() was added by the commit 2a1d446019f9a5983e > ("kthread: Implement park/unpark facility"). It is currently used > only when enabling new CPU. For this purpose, the newly created > kthread has to be parked. > > The CPU binding is a bit tricky. The kthread is parked when the CPU > has not been allowed yet. And the CPU is bound when the kthread > is unparked. > > The function would be useful for more per-CPU kthreads, e.g. > bnx2fc_thread, fcoethread. For this purpose, the newly created > kthread should stay in the uninterruptible state. > > This patch moves the parking into smpboot. It binds the thread > already when created. Then the function might be used universally. > Also the behavior is consistent with kthread_create() and > kthread_create_on_node(). > > Signed-off-by: Petr Mladek 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/