All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Tejun Heo <tj@kernel.org>, Gu Zheng <guz.fnst@cn.fujitsu.com>
Cc: <linux-kernel@vger.kernel.org>, <laijs@cn.fujitsu.com>,
	<isimatu.yasuaki@jp.fujitsu.com>, <tangchen@cn.fujitsu.com>
Subject: Re: [PATCH] workqueue: update numa affinity when node hotplug
Date: Mon, 2 Mar 2015 17:41:05 +0900	[thread overview]
Message-ID: <54F42221.6000904@jp.fujitsu.com> (raw)
In-Reply-To: <20150227115401.GD3964@htj.duckdns.org>

On 2015/02/27 20:54, Tejun Heo wrote:
> Hello,
>
> On Fri, Feb 27, 2015 at 06:04:52PM +0800, Gu Zheng wrote:
>> Yasuaki Ishimatsu found that with node online/offline, cpu<->node
>> relationship is established. Because workqueue uses a info which was
>> established at boot time, but it may be changed by node hotpluging.
>
> I've asked this a couple times now but can somebody please justify why
> cpu<->node relationship needs to change?  If it has to change, that's
> okay but let's please first make sure that we understand why such
> thing is necessary so that we can figure out what kind of facilities
> are necessary for such dynamism.
>
> Thanks.
>

Let me start from explaining current behavior.

- cpu-id is determined when a new processor(lapicid/x2apicid) is founded.
   cpu-id<->nodeid relationship is _not_ recorded.

- node-id is determined when a new pxm(firmware info) is founded.
   pxm<->nodeid relationship is recorded.

By this, there are 2 cases of cpu<->nodeid change.

Case A) In x86, cpus on memory-less nodes are all tied to existing nodes(round robin).
At memory-hotadd happens and a new node comes, cpus are moved to a newly added node
based on pxm.

Case B) Adding a node after removing another node, if pxm of them were different from
each other, cpu<->node relatiionship changes.

I personally thinks proper fix is building persistent cpu-id <-> lapicid relationship as
pxm does rather than creating band-aid.

But I have no good idea to hanlde case A), which is used now.
Hm, Case-A will not be problem for the case of workqueue's kmalloc because a node with
ZONE_NORMAL cannot be removed.

Thanks,
-Kame


  reply	other threads:[~2015-03-02  8:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 10:04 [PATCH] workqueue: update numa affinity when node hotplug Gu Zheng
2015-02-27 11:54 ` Tejun Heo
2015-03-02  8:41   ` Kamezawa Hiroyuki [this message]
2015-03-02 16:28     ` Tejun Heo
2015-03-03  6:53       ` Kamezawa Hiroyuki
2015-03-03 13:18         ` Tejun Heo
2015-03-04  5:45           ` Kamezawa Hiroyuki
2015-03-05  1:23             ` Gu Zheng
2015-03-05  7:16               ` Kamezawa Hiroyuki

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=54F42221.6000904@jp.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tangchen@cn.fujitsu.com \
    --cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.