From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755366AbcI0P0R (ORCPT ); Tue, 27 Sep 2016 11:26:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33462 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754398AbcI0P0Q (ORCPT ); Tue, 27 Sep 2016 11:26:16 -0400 Message-ID: <57EA8F96.6030303@redhat.com> Date: Tue, 27 Sep 2016 11:26:14 -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: Greg Kroah-Hartman CC: Borislav Petkov , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , 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> <20160926115728.sdnvjaz3ty6xpsvr@pd.tnic> <57EA5BF4.1060508@redhat.com> <20160927134957.GB19759@kroah.com> In-Reply-To: <20160927134957.GB19759@kroah.com> 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.27]); Tue, 27 Sep 2016 15:26:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/27/2016 09:49 AM, Greg Kroah-Hartman wrote: > On Tue, Sep 27, 2016 at 07:45:56AM -0400, Prarit Bhargava wrote: >> On 09/26/2016 07:57 AM, Borislav Petkov wrote: >>> $ echo 0 > /sys/devices/system/cpu/cpu2/online >> >> This results in the topology directory being destroyed. It shouldn't be -- the >> socket and core are still there. If you could open up your computer you could >> touch them. This is similar to downing a PCI device, or removing !kernel memory >> DIMM from a system. The device is still physically there. > > If you remove a PCI device from the system, by turning it off from the > PCI hotplug interface, it will go away from sysfs, just like this CPU > device is going away, no matter if you physically remove the device or > not. > While similar, the thread's device struct, link to structures, and masks in the kernel are kept in place. In the PCI case these links are all destroyed which results in requiring a bus rescan to find the devcie. The sysfs (soft) removal of a thread has a very different outcome from PCI. I see now that the issue is not understanding the difference between physical and soft thread removal. I will write that up and get back to everyone. P. > Thanks for validating that everything is working the same and correctly > :) > > greg k-h >