[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57EA5C6C.8090507@redhat.com>
Date: Tue, 27 Sep 2016 07:47:56 -0400
From: Prarit Bhargava <prarit@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
CC: Borislav Petkov <bp@...e.de>, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Len Brown <len.brown@...el.com>,
Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>,
Juergen Gross <jgross@...e.com>
Subject: Re: [PATCH 0/2 v3] cpu hotplug: Preserve topology directory after
soft remove event
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.
Powered by blists - more mailing lists