Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752461AbdGEJRV (ORCPT ); Wed, 5 Jul 2017 05:17:21 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:40734 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750867AbdGEJRU (ORCPT ); Wed, 5 Jul 2017 05:17:20 -0400 Date: Wed, 5 Jul 2017 11:17:15 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: Vikram Mulukutla , Rusty Russell , Tejun Heo , Andrew Morton , LKML , Sebastian Sewior Subject: Re: [PATCH] smp/hotplug: Move unparking of percpu threads to the control CPU Message-ID: <20170705091715.lv57k25kntqh4nic@hirez.programming.kicks-ass.net> References: <20170705090440.hxnpsj2pgxykg3t6@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 701 Lines: 27 On Wed, Jul 05, 2017 at 11:07:34AM +0200, Thomas Gleixner wrote: > On Wed, 5 Jul 2017, Peter Zijlstra wrote: > > OK, so if I get this right we do something like: > > > > > > BP AP > > > > bringup_cpu(); > > __cpu_up() ------------> /* stuff */ > > bringup_wait_for_ap() > > wait_for_completion(); > > cpuhp_online_idle(); > > <------------ complete(&st->done); > > unpark() > > while(1) > > do_idle(); > > actually I added after unpark(): > > kick_ap() > wait_for_completion() > > So the AP will execute the online callbacks in its own hotplug thread. Indeed, but I stopped after the unpark() bits bcause well, that's what you changed here :-)