linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Borislav Petkov <bp@suse.de>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Len Brown <len.brown@intel.com>, Andi Kleen <ak@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Juergen Gross <jgross@suse.com>
Subject: Re: [PATCH 0/2 v3] cpu hotplug: Preserve topology directory after soft remove event
Date: Tue, 27 Sep 2016 07:47:56 -0400	[thread overview]
Message-ID: <57EA5C6C.8090507@redhat.com> (raw)
In-Reply-To: <20160926115940.GB5016@twins.programming.kicks-ass.net>



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.

  reply	other threads:[~2016-09-27 11:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 11:39 [PATCH 0/2 v3] cpu hotplug: Preserve topology directory after soft remove event Prarit Bhargava
2016-09-21 11:39 ` [PATCH 1/2 v3] drivers/base: Combine topology.c and cpu.c Prarit Bhargava
2016-09-21 11:39 ` [PATCH 2/2 v3] cpu hotplug: add CONFIG_PERMANENT_CPU_TOPOLOGY Prarit Bhargava
2016-09-21 13:04 ` [PATCH 0/2 v3] cpu hotplug: Preserve topology directory after soft remove event Borislav Petkov
2016-09-21 13:32   ` Prarit Bhargava
2016-09-21 14:01     ` Borislav Petkov
2016-09-22 11:59       ` Prarit Bhargava
2016-09-22 12:10         ` Borislav Petkov
2016-09-26 11:45           ` Prarit Bhargava
2016-09-26 11:57             ` Borislav Petkov
2016-09-27 11:45               ` Prarit Bhargava
2016-09-27 13:49                 ` Greg Kroah-Hartman
2016-09-27 15:26                   ` Prarit Bhargava
2016-09-28  5:05                     ` Borislav Petkov
2016-09-28  6:48                     ` Peter Zijlstra
2016-09-28 10:06                       ` Prarit Bhargava
2016-09-28  5:02                 ` Borislav Petkov
2016-09-26 11:59             ` Peter Zijlstra
2016-09-27 11:47               ` Prarit Bhargava [this message]
2016-09-27 11:57                 ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57EA5C6C.8090507@redhat.com \
    --to=prarit@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=bp@suse.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=jolsa@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).