From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933429AbcI0LsH (ORCPT ); Tue, 27 Sep 2016 07:48:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33886 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932356AbcI0Lr7 (ORCPT ); Tue, 27 Sep 2016 07:47:59 -0400 Message-ID: <57EA5C6C.8090507@redhat.com> Date: Tue, 27 Sep 2016 07:47:56 -0400 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Peter Zijlstra CC: Borislav Petkov , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Greg Kroah-Hartman , Len Brown , Andi Kleen , Jiri Olsa , Juergen Gross Subject: Re: [PATCH 0/2 v3] cpu hotplug: Preserve topology directory after soft remove event References: <1474457973-19536-1-git-send-email-prarit@redhat.com> <20160921130428.2e7bprll64vs6h2r@pd.tnic> <57E28BFF.8060107@redhat.com> <20160921140135.i5emid4qno2o6cre@pd.tnic> <57E3C78C.5040400@redhat.com> <20160922121039.l6lnhb53os2af27x@pd.tnic> <57E90A61.60402@redhat.com> <20160926115940.GB5016@twins.programming.kicks-ass.net> In-Reply-To: <20160926115940.GB5016@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 27 Sep 2016 11:47:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/26/2016 07:59 AM, Peter Zijlstra wrote: > On Mon, Sep 26, 2016 at 07:45:37AM -0400, Prarit Bhargava wrote: >>> But then code which reads those will have to *know* that those cores are >>> offline - otherwise it would be confused by what it is reading there. >> >> When offline, /sys/devices/system/cpuX/cpu/online is 0. The problem is that >> when online is 0, topology disappears so there is no way to determine _the >> location_ of the offline'd thread. > > As far as all that code is concerned, that CPU doesn't even have a > location anymore. > > While there might be some distinction between hotplug and physical > hotplug on the user API side (I really wouldn't know), there isn't on > the kernel side. > > Once you unplug a CPU, its _gone_. There isn't another hotplug operation > once you really take the CPU out. There's a difference between soft remove (via sysfs) and a true hot remove operation (where the whole thing is physically removed). Soft remove only results in the processor being made "not available" to the scheduler. > > Offline means out gone, vamoosh. No, that is incorrect. The socket that contains the cores (and threads) is still plugged in. > > And it doesn't make sense to talk about the location of a resource > that's not there. > Again, it is _physically_ there. P.