From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH v3 02/22] kthread/smpboot: Do not park in kthread_create_on_cpu() Date: Wed, 25 Nov 2015 22:16:16 +0100 (CET) Message-ID: References: <1447853127-3461-1-git-send-email-pmladek@suse.com> <1447853127-3461-3-git-send-email-pmladek@suse.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <1447853127-3461-3-git-send-email-pmladek-IBi9RG/b67k@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org 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-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Vlastimil Babka , linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by kanga.kvack.org (Postfix) with ESMTP id 47E6A6B0038 for ; Wed, 25 Nov 2015 16:17:17 -0500 (EST) Received: by wmww144 with SMTP id w144so85813461wmw.0 for ; Wed, 25 Nov 2015 13:17:16 -0800 (PST) Received: from Galois.linutronix.de (Galois.linutronix.de. [2001:470:1f0b:db:abcd:42:0:1]) by mx.google.com with ESMTPS id eq8si37029514wjc.248.2015.11.25.13.17.15 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 25 Nov 2015 13:17:16 -0800 (PST) Date: Wed, 25 Nov 2015 22:16:16 +0100 (CET) From: Thomas Gleixner 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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: 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 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org