[PATCH] powerpc/pseries: Perform full re-add of CPU for topology update post-migration

2018-10-29 Thread Nathan Fontenot
-off-by: Nathan Fontenot --- arch/powerpc/include/asm/topology.h |2 ++ arch/powerpc/mm/numa.c |9 + arch/powerpc/platforms/pseries/hotplug-cpu.c | 19 +++ 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/arch/powerpc

Re: [PATCH v04 3/4] migration/memory: Evaluate LMB assoc changes

2018-10-10 Thread Nathan Fontenot
On 10/09/2018 03:37 PM, Michael Bringmann wrote: > migration/memory: This patch adds code that recognizes changes to > the associativity of memory blocks described by the device-tree > properties in order to drive equivalent 'hotplug' operations to > update local and general kernel data structures

Re: [PATCH v04 3/5] migration/memory: Add hotplug READD_MULTIPLE

2018-10-10 Thread Nathan Fontenot
On 10/09/2018 03:36 PM, Michael Bringmann wrote: > migration/memory: This patch adds a new pseries hotplug action > for CPU and memory operations, PSERIES_HP_ELOG_ACTION_READD_MULTIPLE. > This is a variant of the READD operation which performs the action > upon multiple instances of the resource at

Re: [PATCH v04 1/5] powerpc/drmem: Export 'dynamic-memory' loader

2018-10-10 Thread Nathan Fontenot
On 10/09/2018 03:36 PM, Michael Bringmann wrote: > powerpc/drmem: Export many of the functions of DRMEM to parse > "ibm,dynamic-memory" and "ibm,dynamic-memory-v2" during hotplug > operations and for Post Migration events. > > Also modify the DRMEM initialization code to allow it to, > > * Be cal

Re: [PATCH 1/2] powerpc/pseries: PAPR persistent memory support

2018-10-10 Thread Nathan Fontenot
On 10/10/2018 01:08 AM, Oliver O'Halloran wrote: > This patch implements support for discovering storage class memory > devices at boot and for handling hotplug of new regions via RTAS > hotplug events. > > Signed-off-by: Oliver O'Halloran > --- > arch/powerpc/include/asm/firmware.h | 3 +

Re: [PATCH v02] powerpc/mobility: Extend start/stop topology update scope

2018-10-10 Thread Nathan Fontenot
top_topology_update() of 'numa.c'. > > Signed-off-by: Michael Bringmann Reviewed-by: Nathan Fontenot > --- > Changes in v02: > -- Rebase to latest powerpc next tree. > --- > arch/powerpc/kernel/rtas.c|2 -- > arch/powerpc/mm/numa.c

Re: [PATCH] powerpc/pseries: Export maximum memory value

2018-10-10 Thread Nathan Fontenot
On 10/10/2018 05:22 AM, Aravinda Prasad wrote: > This patch exports the maximum possible amount of memory > configured on the system via /proc/powerpc/lparcfg. > > Signed-off-by: Aravinda Prasad > --- > arch/powerpc/platforms/pseries/lparcfg.c | 13 + > 1 file changed, 13 insertion

Re: [PATCH v3 -next] powerpc/pseries/memory-hotplug: Fix return value type of find_aa_index

2018-10-10 Thread Nathan Fontenot
t; > Fixes: c05a5a40969e ("powerpc/pseries: Dynamic add entires to associativity > lookup array") > Signed-off-by: YueHaibing Reviewed-by: Nathan Fontenot nf...@linux.vnet.ibm.com> > --- > v3: change find_aa_index return type to bool > v2: use 'rc' trac

Re: [PATCH v03 1/5] powerpc/drmem: Export 'dynamic-memory' loader

2018-10-03 Thread Nathan Fontenot
On 10/02/2018 08:00 PM, Michael Ellerman wrote: > Michael Bringmann writes: > >> powerpc/drmem: Export many of the functions of DRMEM to parse >> "ibm,dynamic-memory" and "ibm,dynamic-memory-v2" during hotplug >> operations and for Post Migration events. > > This isn't a criticism of your patch,

Re: [PATCH] powerpc/mobility: Extend start/stop topology update scope

2018-10-02 Thread Nathan Fontenot
top_topology_update() of 'numa.c'. > > Signed-off-by: Michael Bringmann Reviewed-by: Nathan Fontenot > --- > arch/powerpc/kernel/rtas.c|4 > arch/powerpc/mm/numa.c|6 ++ > arch/powerpc/platforms/pseries/mobility.c |5

[PATCH v2] powerpc/pseries: Track LMB nid instead of using device tree

2018-10-02 Thread Nathan Fontenot
his we need to track the node a LMB belongs to when it is added to the system so we can remove it from that node instead of the node that the device tree indicates it should belong to. Signed-off-by: Nathan Fontenot --- Updates: V2: Fix builds to only track nid for LMBs when MEMORY_HOTPLUG

Re: [PATCH v2] powerpc/rtas: Fix a potential race between CPU-Offline & Migration

2018-10-01 Thread Nathan Fontenot
tioned assumption. In this unlikely case > these offlined CPUs will not call H_JOIN, resulting in a system hang. > > Fix this by verifying that all the present CPUs are actually online > after CPU-Hotplug has been disabled, failing which we restore the > state of the offline CPUs

Re: [PATCH] powerpc/rtas: Fix a potential race between CPU-Offline & Migration

2018-09-28 Thread Nathan Fontenot
On 09/28/2018 02:02 AM, Gautham R Shenoy wrote: > Hi Nathan, > > On Thu, Sep 27, 2018 at 12:31:34PM -0500, Nathan Fontenot wrote: >> On 09/27/2018 11:51 AM, Gautham R. Shenoy wrote: >>> From: "Gautham R. Shenoy" >>> >>> Live Partition Mi

Re: [PATCH -next] powerpc/pseries/memory-hotplug: Fix return value type of find_aa_index

2018-09-28 Thread Nathan Fontenot
On 09/21/2018 05:37 AM, YueHaibing wrote: > find_aa_index will return -1 when dlpar_clone_property fails, > its return value type should be int. Also the caller > update_lmb_associativity_index should use a int variable to > get it,then compared with 0. The aa_index that we are handling here is de

Re: [PATCH] powerpc/rtas: Fix a potential race between CPU-Offline & Migration

2018-09-27 Thread Nathan Fontenot
ith -EBUSY. Would we also want to havr the ability to re-try onlining all of the cpus before failing the migration? This would involve a bigger code change as the current code to online all CPUs would work in its current form. -Nathan > > Cc: Nathan Fontenot > Cc: Tyrel Datwyler > Sugge

Re: [PATCH] powerpc/pseries: Track LMB nid instead of using device tree

2018-09-24 Thread Nathan Fontenot
On 09/19/2018 11:38 PM, Michael Ellerman wrote: > Nathan Fontenot writes: > >> When removing memory we need to remove the memory from the node >> it was added to instead of looking up the node it should be in >> in the device tree. >> >> During testing we ha

Re: [PATCH] powerpc/pseries: Disable CPU hotplug across migrations

2018-09-24 Thread Nathan Fontenot
On 09/24/2018 03:56 AM, Gautham R Shenoy wrote: > Hi Michael, > > On Mon, Sep 24, 2018 at 05:00:42PM +1000, Michael Ellerman wrote: >> Nathan Fontenot writes: >>> On 09/18/2018 05:32 AM, Gautham R Shenoy wrote: >>>> Hi Nathan, >>>> On Tue, Sep

Re: [PATCH] powerpc/pseries: Disable CPU hotplug across migrations

2018-09-20 Thread Nathan Fontenot
On 09/18/2018 05:32 AM, Gautham R Shenoy wrote: > Hi Nathan, > On Tue, Sep 18, 2018 at 1:05 AM Nathan Fontenot > wrote: >> >> When performing partition migrations all present CPUs must be online >> as all present CPUs must make the H_JOIN call as part of the migration &

[PATCH] powerpc/pseries: Disable CPU hotplug across migrations

2018-09-17 Thread Nathan Fontenot
migration process. Signed-off-by: Nathan Fontenot --- arch/powerpc/kernel/rtas.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 8afd146bc9c7..2c7ed31c736e 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel

[PATCH] powerpc/pseries: Track LMB nid instead of using device tree

2018-09-12 Thread Nathan Fontenot
his we need to track the node a LMB belongs to when it is added to the system so we can remove it from that node instead of the node that the device tree indicates it should belong to. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/drmem.h|1 + arch/powerpc/mm/d

[PATCH v5 2/2] powerpc/pseries:Remove unneeded uses of dlpar work queue

2018-09-10 Thread Nathan Fontenot
workqueue, the other cases can handle the dlpar request directly. This patch exports the handle_dlpar_errorlog() function so that dlpar hotplug events can be handled directly and updates the two instances mentioned above to use the direct invocation. Signed-off-by: Nathan Fontenot --- arch/powerpc

[PATCH v5 1/2] powerpc/pseries: Remove prrn_work workqueue

2018-09-10 Thread Nathan Fontenot
When a PRRN event is received we are already running in a worker thread. Instead of spawning off another worker thread on the prrn_work workqueue to handle the PRRN event we can just call the PRRN handler routine directly. With this update we can also pass the scope variable for the PRRN event dir

[PATCH v5 0/2] powerpc/pseries: Improve serialization of PRRN events

2018-09-10 Thread Nathan Fontenot
4 Instruction dump: 4 5:47 122 X4XX X5XX 6000 6000 6000 6000 -Nathan --- Nathan Fontenot (2): powerpc/pseries: Remove prrn_work workqu

[PATCH v4 2/2] powerpc/pseries:Remove unneeded uses of dlpar work queue

2018-08-30 Thread Nathan Fontenot
workqueue, the other cases can handle the dlpar request directly. This patch exports the handle_dlpar_errorlog() function so that dlpar hotplug events can be handled directly and updates the two instances mentioned above to use the direct invocation. Signed-off-by: Nathan Fontenot --- arch/powerpc

[PATCH v4 1/2] powerpc/pseries: Remove prrn_work workqueue

2018-08-30 Thread Nathan Fontenot
When a PRRN event is received we are already running in a worker thread. Instead of spawning off another worker thread on the prrn_work workqueue to handle the PRRN event we can just call the PRRN handler routine directly. With this update we can also pass the scope variable for the PRRN event dir

[PATCH v4 0/2] powerpc/pseries: Improve serialization of PRRN events

2018-08-30 Thread Nathan Fontenot
operations are complete, not after handler is scheduled. -Remove call to flush_work, the previous broken method of serializing PRRN events. Nathan Fontenot (2): powerpc/pseries: Remove prrn_work workqueue powerpc/pseries:Remove unneeded uses of dlpar work queue arch/powerpc

Re: [PATCH v3 2/2] powerpc/pseries: Wait for completion of hotplug events during PRRN handling

2018-08-09 Thread Nathan Fontenot
On 08/08/2018 10:29 AM, John Allen wrote: > While handling PRRN events, the time to handle the actual hotplug events > dwarfs the time it takes to perform the device tree updates and queue the > hotplug events. In the case that PRRN events are being queued continuously, > hotplug events have been o

Re: [PATCH v07 6/9] pmt/numa: Disable arch_update_cpu_topology during CPU readd

2018-07-24 Thread Nathan Fontenot
On 07/13/2018 03:18 PM, Michael Bringmann wrote: pmt/numa: Disable arch_update_cpu_topology during post migration CPU readd updates when evaluating device-tree changes after LPM to avoid thread deadlocks trying to update node assignments. System timing between all of the threads and timers restar

Re: [PATCH v07 2/9] hotplug/cpu: Add operation queuing function

2018-07-23 Thread Nathan Fontenot
On 07/13/2018 03:18 PM, Michael Bringmann wrote: migration/dlpar: This patch adds function dlpar_queue_action() which will queued up information about a CPU/Memory 'readd' operation according to resource type, action code, and DRC index. At a subsequent point, the list of operations can be run/pl

Re: [PATCH v07 1/9] hotplug/cpu: Conditionally acquire/release DRC index

2018-07-23 Thread Nathan Fontenot
On 07/13/2018 03:17 PM, Michael Bringmann wrote: powerpc/cpu: Modify dlpar_cpu_add and dlpar_cpu_remove to allow the skipping of DRC index acquire or release operations during the CPU add or remove operations. This is intended to support subsequent changes to provide a 'CPU readd' operation. Si

Re: [PATCH v2 2/2] powerpc/pseries: Wait for completion of hotplug events during PRRN handling

2018-07-20 Thread Nathan Fontenot
observed to be queued faster than the kernel can actually handle them. This patch avoids the problem by waiting for a hotplug request to complete before queueing more hotplug events. Signed-off-by: John Allen Reviewed-by: Nathan Fontenot --- arch/powerpc/platforms/pseries/mobility.c | 5 - 1

Re: [PATCH v2 1/2] powerpc/pseries: Avoid blocking rtas polling handling multiple PRRN events

2018-07-20 Thread Nathan Fontenot
Reviewed-by: Nathan Fontenot --- v2: -Unlock prrn_lock when PRRN operations are complete, not after handler is scheduled. -Remove call to flush_work, the previous broken method of serializing PRRN events. --- arch/powerpc/kernel/rtasd.c | 10 +++--- 1 file changed, 7

Re: [powerpc/powervm]kernel BUG at mm/memory_hotplug.c:1864!

2018-06-26 Thread Nathan Fontenot
On 06/12/2018 05:28 AM, Balbir Singh wrote: > > > On 11/06/18 17:41, vrbagal1 wrote: >> On 2018-06-08 17:45, Oscar Salvador wrote: >>> On Fri, Jun 08, 2018 at 05:11:24PM +0530, vrbagal1 wrote: On 2018-06-08 16:58, Oscar Salvador wrote: > On Fri, Jun 08, 2018 at 04:44:24PM +0530, vrbagal1

Re: [RFC v4 4/4] hotplug/drcinfo: Code cleanup for devices

2018-05-22 Thread Nathan Fontenot
On 05/22/2018 11:37 AM, Michael Bringmann wrote: > This patch extends the use of a common parse function for the > ibm,drc-info property that can be modified by a callback function > to the hotplug device processing. Candidate code is replaced by > a call to the parser including a pointer to a loc

Re: [RFC v4 3/4] hotplug/drcinfo: Fix hot-add CPU issues

2018-05-22 Thread Nathan Fontenot
On 05/22/2018 11:37 AM, Michael Bringmann wrote: > This patch applies a common parse function for the ibm,drc-info > property that can be modified by a callback function to the > hot-add CPU code. Candidate code is replaced by a call to the > parser including a pointer to a local context-specific

Re: [RFC v4 2/4] hotplug/drcinfo: Provide parser with callback

2018-05-22 Thread Nathan Fontenot
On 05/22/2018 11:37 AM, Michael Bringmann wrote: > This patch provides a common parse function for the ibm,drc-info > property that can be modified by a callback function. The caller > provides a pointer to the function and a pointer to their unique > data, and the parser provides the current lmb

Re: [RFC v4 2/4] hotplug/drcinfo: Provide parser with callback

2018-05-22 Thread Nathan Fontenot
On 05/22/2018 11:37 AM, Michael Bringmann wrote: > This patch provides a common parse function for the ibm,drc-info > property that can be modified by a callback function. The caller > provides a pointer to the function and a pointer to their unique > data, and the parser provides the current lmb

Re: [RFC v4 1/4] hotplug/drcinfo: Simplify parse ibm, drc-info structs

2018-05-22 Thread Nathan Fontenot
On 05/22/2018 11:37 AM, Michael Bringmann wrote: > Replace use of of_prop_next_u32() in when parsing 'ibm,drc-info' > structure to simplify and reduce parsing code. > You mention that this patch is to fix the parsing of the drc-info struct, but you end up making changes to the parsing code in pse

Re: [RFC v5 2/6] powerpc/cpu: Conditionally acquire/release DRC index

2018-05-22 Thread Nathan Fontenot
On 05/21/2018 12:52 PM, Michael Bringmann wrote: > powerpc/cpu: Modify dlpar_cpu_add and dlpar_cpu_remove to allow the > skipping of DRC index acquire or release operations during the CPU > add or remove operations. This is intended to support subsequent > changes to provide a 'CPU readd' operatio

Re: [PATCH] pseries/memory-hotplug: Only update DT once per memory DLPAR request

2018-05-22 Thread Nathan Fontenot
Hi Michael, I sent this patch out several weeks ago, just wanted to make sure it hasn't fallen off your radar. Thanks, -Nathan On 04/20/2018 03:29 PM, Nathan Fontenot wrote: > The updates to powerpc numa and memory hotplug code now use the > in-kernel LMB array instead of the device

Re: [RFC v3 1/4] powerpc/hotplug/drcinfo: Fix bugs parsing ibm,drc-info structs

2018-05-18 Thread Nathan Fontenot
On 05/17/2018 05:41 PM, Michael Bringmann wrote: > [Replace/withdraw previous patch submission to ensure that testing > of related patches on similar hardware progresses together.] > > This patch fixes a memory parsing bug when using of_prop_next_u32 > calls at the start of a structure. Depending

Re: [RFC v4 2/3] powerpc migration/cpu: Associativity & cpu changes

2018-05-18 Thread Nathan Fontenot
On 05/17/2018 05:26 PM, Michael Bringmann wrote: > powerpc migration/cpu: Now apply changes to the associativity of cpus > for the topology of LPARS in Post Migration events. Recognize more > changes to the associativity of memory blocks described by the > 'cpu' properties when processing the topo

Re: [RFC v4 1/3] powerpc migration/drmem: Modify DRMEM code to export more features

2018-05-18 Thread Nathan Fontenot
On 05/17/2018 05:26 PM, Michael Bringmann wrote: > powerpc migration/drmem: Export many of the functions of DRMEM to > parse "ibm,dynamic-memory" and "ibm,dynamic-memory-v2" during > hotplug operations and for Post Migration events. > > Also modify the DRMEM initialization code to allow it to, >

Re: [RFC v2 3/3] postmigration/memory: Associativity & ibm,dynamic-memory-v2

2018-04-26 Thread Nathan Fontenot
On 04/24/2018 04:35 PM, Michael Bringmann wrote: > See below. > > On 04/24/2018 12:17 PM, Nathan Fontenot wrote: >> On 02/26/2018 02:53 PM, Michael Bringmann wrote: >>> postmigration/memory: Now apply changes to the associativity of memory >>> blocks descri

Re: [RFC v2 1/3] hotplug/mobility: Apply assoc updates for Post Migration Topo

2018-04-26 Thread Nathan Fontenot
On 04/24/2018 04:33 PM, Michael Bringmann wrote: > See comments below: > > On 04/24/2018 11:56 AM, Nathan Fontenot wrote: >> On 02/26/2018 02:52 PM, Michael Bringmann wrote: >>> hotplug/mobility: Recognize more changes to the associativity of >>> memory blocks des

Re: [RFC v2 3/3] postmigration/memory: Associativity & ibm,dynamic-memory-v2

2018-04-24 Thread Nathan Fontenot
On 02/26/2018 02:53 PM, Michael Bringmann wrote: > postmigration/memory: Now apply changes to the associativity of memory > blocks described by the 'ibm,dynamic-memory-v2' property regarding > the topology of LPARS in Post Migration events. > > * Extend the previous work done for the 'ibm,associat

Re: [RFC v2 2/3] postmigration/memory: Review assoc lookup array changes

2018-04-24 Thread Nathan Fontenot
On 02/26/2018 02:53 PM, Michael Bringmann wrote: > postmigration/memory: In an LPAR migration scenario, the property > "ibm,associativity-lookup-arrays" may change. In the event that a > row of the array differs, locate all assigned memory blocks with that > 'aa_index' and 're-add' them to the s

Re: [RFC v2 1/3] hotplug/mobility: Apply assoc updates for Post Migration Topo

2018-04-24 Thread Nathan Fontenot
On 02/26/2018 02:52 PM, Michael Bringmann wrote: > hotplug/mobility: Recognize more changes to the associativity of > memory blocks described by the 'ibm,dynamic-memory' and 'cpu' > properties when processing the topology of LPARS in Post Migration > events. Previous efforts only recognized whethe

[PATCH] pseries/memory-hotplug: Only update DT once per memory DLPAR request

2018-04-20 Thread Nathan Fontenot
ingle new property is created when a DLPAR request completes successfully. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/drmem.h|5 ++ arch/powerpc/platforms/pseries/hotplug-memory.c | 55 +++ 2 files changed, 21 insertions(+), 39 dele

Re: [RFC PATCH v0 2/2] powerpc, drmem: Rename DRMEM_LMB_RESERVED to DRMEM_LMB_ISOLATED

2018-02-22 Thread Nathan Fontenot
bit already exists DRCONF_MEM_RESERVED. Since > both DRMEM_LMB_RESERVED and DRCONF_MEM_RESERVED operate on the same > LMB flags word, rename the former to DRMEM_LMB_ISOLATED. > > Signed-off-by: Bharata B Rao Reviewed-by: Nathan Fontenot > --- > arch/powerpc/include/a

Re: [RFC PATCH v0 1/2] powerpc, drmem: Fix unexpected flag value in ibm, dynamic-memory-v2

2018-02-22 Thread Nathan Fontenot
mory is added, it leads to one entry for 3 LMBs > and 1 separate entry for the last LMB. All the 4 LMBs should be > defined by one entry here. > > Fix this by always accessing the flags by its accessor method > drmem_lmb_flags(). > > Signed-off-by: Bharata B Rao Reviewed-by:

[PATCH] pseries/drmem: Check for zero filled ibm, dynamic-memory property.

2018-02-15 Thread Nathan Fontenot
linux,phandle = <0x7e57eed8>; ibm,associativity-lookup-arrays = <0x1 0x4 0x0 0x0 0x0 0x0>; ibm,memory-preservation-time = <0x0>; }; Signed-off-by: Nathan Fontenot --- arch/powerpc/mm/drmem.c |8 1 file changed, 8 insertions(+) diff --git a/arch/

Re: 4.16-rc1 virtual machine crash on boot

2018-02-14 Thread Nathan Fontenot
On 02/14/2018 03:37 PM, Tyrel Datwyler wrote: > On 02/13/2018 10:15 PM, Cyril Bur wrote: >> On Tue, 2018-02-13 at 21:12 -0800, Tyrel Datwyler wrote: >>> On 02/13/2018 05:20 PM, Cyril Bur wrote: Hello all, >>> >>> Does reverting commit 02ef6dd8109b581343ebeb1c4c973513682535d6 alleviate >>> the

Re: [PATCH V3 0/9] powerpc: Support for ibm,dynamic-memory-v2

2018-02-14 Thread Nathan Fontenot
On 02/14/2018 03:30 PM, Tyrel Datwyler wrote: > On 12/03/2017 09:13 PM, Michael Ellerman wrote: >> Nathan Fontenot writes: >> >>> This patch set provides a series of updates to de-couple the LMB >>> information provided in the device tree property from the devi

[PATCH] pseries: Fix build break for SPLPAR=n and CPU hotplug

2018-02-09 Thread Nathan Fontenot
can define it as a no-op for SPLAPR=n builds. Fixes: e67e02a ("powerpc/pseries: Fix cpu hotplug crash with memoryless nodes") Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/topology.h |9 + arch/powerpc/platforms/pseries/hotplug-cpu.c |3 +--

Re: [PATCH RESEND V2 ] powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove

2018-01-29 Thread Nathan Fontenot
On 01/27/2018 02:58 AM, Michael Ellerman wrote: > Nathan Fontenot writes: > >> When DLPAR removing a CPU, the unmapping of the cpu from a node in >> unmap_cpu_from_node() should also invalidate the CPUs entry in the >> numa_cpu_lookup_table. There is not a guarantee that

[PATCH RESEND V2 ] powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove

2018-01-26 Thread Nathan Fontenot
does not match the device tree or the topology reported by the HMC. Signed-off-by: Nathan Fontenot --- Originally sent Dec. 5 2017, no reply, resending. Updates for V2: Move the invalidation from unmap_cpu_from_node to pseries_remove_processor, the former routine is also called during cpu offline

Re: [PATCH V2] powerpc/kernel: Add 'ibm,thread-groups' property for CPU allocation

2018-01-12 Thread Nathan Fontenot
On 01/08/2018 11:19 AM, Michael Bringmann wrote: > Add code to parse the new property 'ibm,thread-groups" when it is > present. The content of this property explicitly defines the number > of threads per core as well as the PowerPC 'threads_core_mask'. > The design provides a common device-tree fo

Re: [PATCH V8 3/3] hotplug/cpu: Fix crash with memoryless nodes

2018-01-08 Thread Nathan Fontenot
CPU-less at the point when we are trying to hot-add a new CPU to it. > > Signed-off-by: Michael Bringmann Reviewed-by: Nathan Fontenot > --- > Changes in V8: > -- Change a 'printk(KERN_INFO ...)' statement to be a pr_debug() > statement. > -- Rename

Re: [PATCH V8 2/3] poserpc/initnodes: Ensure nodes initialized for hotplug

2018-01-08 Thread Nathan Fontenot
e, the > try_online_node operation occurs wholly within the CPU locks with no > overlap. Using HMC hot-add/hot-remove operations, we have been able > to add and remove CPUs to any possible node without failures. HMC > operations involve a degree self-serialization, though. > > Signed

Re: [PATCH V8 1/3] powerpc/nodes: Ensure enough nodes avail for operations

2018-01-08 Thread Nathan Fontenot
gt; > presently seen in the function arch/powerpc/mm/numa.c:initmem_init(). > > If the "ibm,max-associativity-domains" property is not present at boot, > no operation will be performed to define or enable additional nodes, or > enable the above 'nodes_and()'. &

Re: [PATCH V2] powerpc/pseries: Invalidate numa_cpu_lookup_table on cpu remove

2018-01-08 Thread Nathan Fontenot
Hi Michael, I hadn't seen any update on this patch, just wanted to make sure you saw it. -Nathan On 12/05/2017 09:33 PM, Nathan Fontenot wrote: > When DLPAR removing a CPU we need to invalidate its entry in the > numa_cpu_lookup_table. There is no guarantee that on a subsequent >

[PATCH V2] powerpc/pseries: Invalidate numa_cpu_lookup_table on cpu remove

2017-12-05 Thread Nathan Fontenot
. This patch move the update_numa_cpu_lookup_table to topology.h so it is available outside of numa.c. A call to this routine is added in pseries_remove_processor(). Signed-off-by: Nathan Fontenot --- Updates for V2: Move the invalidation from unmap_cpu_from_node to pseries_remove_processor, the

Re: [PATCH] powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove

2017-12-05 Thread Nathan Fontenot
Disregard. I'll send an updated patch soon. -Nathan On 12/05/2017 02:55 PM, Nathan Fontenot wrote: > When DLPAR removing a CPU, the unmapping of the cpu from a node in > unmap_cpu_from_node() should also invalidate the CPUs entry in the > numa_cpu_lookup_table. There is not a guara

[PATCH] powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove

2017-12-05 Thread Nathan Fontenot
does not match the device tree or the topology reported by the HMC. Signed-off-by: Nathan Fontenot --- arch/powerpc/mm/numa.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index adb6364f4091..415b1a76b429 100644 --- a/arch/powerpc/mm/numa.c

[PATCH V3 9/9] powerpc: Enable support of ibm,dynamic-memory-v2

2017-12-01 Thread Nathan Fontenot
Add required bits to the architecture vector to enable support of the ibm,dynamic-memory-v2 device tree property. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/firmware.h |3 ++- arch/powerpc/include/asm/prom.h |1 + arch/powerpc/kernel/prom_init.c

[PATCH V3 8/9] powerpc/drmem: Add support for ibm, dynamic-memory-v2 property

2017-12-01 Thread Nathan Fontenot
proper format for ibm,dynamic-memory-v2. Signed-off-by: Nathan Fontenot --- Updates for V3: Provide parsing routines for ibm,dynamic-memory-v2 to be called from the walk_drmem_lmb* routines. arch/powerpc/include/asm/drmem.h | 12 ++ arch/powerpc/mm/drmem.c | 192

[PATCH V3 7/9] powerpc: Move of_drconf_cell struct to asm/drmem.h

2017-12-01 Thread Nathan Fontenot
for version 2 of the dynamic reconfiguration property and the members are typed as __be* values to reflect how they exist in the device tree. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/drmem.h| 18 ++ arch/powerpc/include/asm/prom.h

[PATCH V3 6/9] powerpc/pseries: Update memory hotplug code to use drmem LMB array

2017-12-01 Thread Nathan Fontenot
proper device tree format and generate a properly formatted device tree property. Signed-off-by: Nathan Fontenot --- Updates for V2: Correct build issues with uninitialized variables arch/powerpc/include/asm/drmem.h| 18 + arch/powerpc/mm/drmem.c | 80

[PATCH V3 5/9] powerpc/numa: Update numa code use walk_drmem_lmbs

2017-12-01 Thread Nathan Fontenot
tree format. Signed-off-by: Nathan Fontenot --- Updates for V3: Convert numa.c to use walk_drmem_lmbs routine and add the late init call for allocating the LMB array. Updates for V2: Removed unused device node paramter to numa_setup_drmem_lmbs() and hot_add_drconf_scn_to_nid(). arch/powerpc

[PATCH V3 4/9] powerpc/mm: Separate ibm, dynamic-memory data from DT format

2017-12-01 Thread Nathan Fontenot
retrieving LMB information. This patch introduces a routine to walk the ibm,dynamic-memory property in the flattened device tree and updates the prom.c code to use this to initialize memory. Signed-off-by: Nathan Fontenot --- Updates for V3: Converted from doing a bootmem allocation early in

[PATCH V3 3/9] powerpc/numa: Look up associativity array in of_drconf_to_nid_single

2017-12-01 Thread Nathan Fontenot
Look up the associativity arrays in of_drconf_to_nid_single when deriving the nid for a LMB instead of having it passed in as a parameter. Signed-off-by: Nathan Fontenot --- arch/powerpc/mm/numa.c | 40 +--- 1 file changed, 17 insertions(+), 23 deletions

[PATCH V3 2/9] powerpc/numa: Look up device node in of_get_usable_memory()

2017-12-01 Thread Nathan Fontenot
Look up the device node for the usable memory property instead of having it passed in as a parameter. This changes precedes an update in which the calling routines for of_get_usable_memory() will not have the device node pointer to pass in. Signed-off-by: Nathan Fontenot --- arch/powerpc/mm

[PATCH V3 1/9] powerpc/numa: Look up device node in of_get_assoc_arrays()

2017-12-01 Thread Nathan Fontenot
Look up the device node for the associativity array property instead of having it passed in as a parameter. This changes precedes an update in which the calling routines for of_get_assoc_arrays() will not have the device node pointer to pass in. Signed-off-by: Nathan Fontenot --- arch/powerpc

[PATCH V3 0/9] powerpc: Support for ibm,dynamic-memory-v2

2017-12-01 Thread Nathan Fontenot
updating the new drmem.c code to be able to parse and create this new device tree format. The last patch in the series updates the architecture vector to indicate support for ibm,dynamic-memory-v2. -Nathan --- Nathan Fontenot (9): powerpc/numa: Look up device node in of_get_assoc_arrays

Re: Resend: [PATCH V5 3/4] hotplug/drc-info: Add code to search ibm,drc-info property

2017-11-30 Thread Nathan Fontenot
On 11/28/2017 05:07 PM, Michael Bringmann wrote: > rpadlpar_core.c: Provide parallel routines to search the older device- > tree properties ("ibm,drc-indexes", "ibm,drc-names", "ibm,drc-types" > and "ibm,drc-power-domains"), or the new property "ibm,drc-info". > > The interface to examine the DR

Re: Resend: [PATCH V5 2/4] pseries/drc-info: Search DRC properties for CPU indexes

2017-11-30 Thread Nathan Fontenot
On 11/28/2017 05:07 PM, Michael Bringmann wrote: > pseries/drc-info: Provide parallel routines to convert between > drc_index and CPU numbers at runtime, using the older device-tree > properties ("ibm,drc-indexes", "ibm,drc-names", "ibm,drc-types" > and "ibm,drc-power-domains"), or the new property

Re: [PATCH V7 3/3] hotplug/cpu: Fix crash with memoryless nodes

2017-11-20 Thread Nathan Fontenot
On 11/16/2017 11:28 AM, Michael Bringmann wrote: > On powerpc systems with shared configurations of CPUs and memory and > memoryless nodes at boot, an event ordering problem was observed on > a SLES12 build platforms with the hot-add of CPUs to the memoryless > nodes. > > * The most common error o

Re: RESEND [PATCH V7 2/3] poserpc/initnodes: Ensure nodes initialized for hotplug

2017-11-20 Thread Nathan Fontenot
On 11/16/2017 11:27 AM, Michael Bringmann wrote: > On powerpc systems which allow 'hot-add' of CPU, it may occur that > the new resources are to be inserted into nodes that were not used > for memory resources at bootup. Many different configurations of > PowerPC resources may need to be supported

Re: [PATCH V7 1/3] powerpc/nodes: Ensure enough nodes avail for operations

2017-11-20 Thread Nathan Fontenot
On 11/16/2017 11:24 AM, Michael Bringmann wrote: > On powerpc systems which allow 'hot-add' of CPU or memory resources, > it may occur that the new resources are to be inserted into nodes > that were not used for these resources at bootup. In the kernel, > any node that is used must be defined a

Re: [PATCH V2 3/3] postmigration/memory: Associativity & ibm,dynamic-memory-v2

2017-11-20 Thread Nathan Fontenot
We may want to wait on this patch. I have been working on patches to separate the LMB information from the device tree property format. Once those patches are acceptable we can use a common routine for affinity updates. -Nathan On 11/16/2017 11:51 AM, Michael Bringmann wrote: > postmigration/memo

Re: [PATCH V2 1/3] hotplug/mobility: Apply assoc updates for Post Migration Topo

2017-11-20 Thread Nathan Fontenot
On 11/16/2017 11:50 AM, Michael Bringmann wrote: > hotplug/mobility: Recognize more changes to the associativity of > memory blocks described by the 'ibm,dynamic-memory' and 'cpu' > properties when processing the topology of LPARS in Post Migration > events. Previous efforts only recognized whethe

Re: Subject: [PATCH V4 3/4] hotplug/drc-info: Add code to search ibm,drc-info property

2017-11-20 Thread Nathan Fontenot
On 11/16/2017 02:11 PM, Michael Bringmann wrote: > rpadlpar_core.c: Provide parallel routines to search the older device- > tree properties ("ibm,drc-indexes", "ibm,drc-names", "ibm,drc-types" > and "ibm,drc-power-domains"), or the new property "ibm,drc-info". > > The interface to examine the DRC

Re: [PATCH V4 2/4] pseries/drc-info: Search DRC properties for CPU indexes

2017-11-20 Thread Nathan Fontenot
On 11/16/2017 02:11 PM, Michael Bringmann wrote: > pseries/drc-info: Provide parallel routines to convert between > drc_index and CPU numbers at runtime, using the older device-tree > properties ("ibm,drc-indexes", "ibm,drc-names", "ibm,drc-types" > and "ibm,drc-power-domains"), or the new property

Re: [PATCH v2 0/8] powerpc: Support ibm,dynamic-memory-v2 property

2017-11-20 Thread Nathan Fontenot
On 11/16/2017 10:51 PM, Bharata B Rao wrote: > > On Thu, Nov 16, 2017 at 9:31 PM, Nathan Fontenot <mailto:nf...@linux.vnet.ibm.com>> wrote: > > > > On 11/15/2017 11:37 PM, Bharata B Rao wrote: > > On Fri, Oct 20, 2017 at 6:51 PM, Nathan Fontenot

Re: RESEND [PATCH V3 3/4] hotplug/drc-info: Add code to search ibm,drc-info property

2017-11-16 Thread Nathan Fontenot
On 11/15/2017 12:09 PM, Michael Bringmann wrote: > rpadlpar_core.c: Provide parallel routines to search the older device- > tree properties ("ibm,drc-indexes", "ibm,drc-names", "ibm,drc-types" > and "ibm,drc-power-domains"), or the new property "ibm,drc-info". > > The interface to examine the DR

Re: RESEND [PATCH V3 2/4] pseries/drc-info: Search DRC properties for CPU indexes

2017-11-16 Thread Nathan Fontenot
On 11/15/2017 12:09 PM, Michael Bringmann wrote: > pseries/drc-info: Provide parallel routines to convert between > drc_index and CPU numbers at runtime, using the older device-tree > properties ("ibm,drc-indexes", "ibm,drc-names", "ibm,drc-types" > and "ibm,drc-power-domains"), or the new property

Re: RESEND [PATCH V3 1/4] powerpc/firmware: Add definitions for new drc-info firmware feature

2017-11-16 Thread Nathan Fontenot
On 11/15/2017 12:09 PM, Michael Bringmann wrote: > Firmware Features: Define new bit flag representing the presence of > new device tree property "ibm,drc-info". The flag is used to tell > the front end processor whether the Linux kernel supports the new > property, and by the front end processor

Re: [PATCH 2/2] powerpc/hotplug: Ensure nodes initialized for hotplug

2017-11-16 Thread Nathan Fontenot
On 11/15/2017 12:28 PM, Michael Bringmann wrote: > Hello: > See below. > > On 10/16/2017 07:54 AM, Michael Ellerman wrote: >> Michael Bringmann writes: >> >>> powerpc/hotplug: On systems like PowerPC which allow 'hot-add' of CPU, >>> it may occur that the new resources are to be inserted in

Re: [PATCH v2 0/8] powerpc: Support ibm,dynamic-memory-v2 property

2017-11-16 Thread Nathan Fontenot
On 11/15/2017 11:37 PM, Bharata B Rao wrote: > On Fri, Oct 20, 2017 at 6:51 PM, Nathan Fontenot <mailto:nf...@linux.vnet.ibm.com>> wrote: > > This patch set provides a set of updates to de-couple the LMB information > provided in the ibm,dynamic-memory device t

Re: [PATCH] [net-next,v3] ibmvnic: Feature implementation of Vital Product Data (VPD) for the ibmvnic driver

2017-11-13 Thread Nathan Fontenot
On 11/10/2017 01:13 PM, Desnes Augusto Nunes do Rosário wrote: > > > On 11/10/2017 12:54 PM, Nathan Fontenot wrote: >> On 11/10/2017 08:41 AM, Desnes Augusto Nunes do Rosário wrote: >>> >>> >>> On 11/09/2017 06:31 PM, Nathan Fontenot wrote: >>&g

Re: [PATCH v2 3/8] powerpc/mm: Separate ibm, dynamic-memory data from DT format

2017-11-13 Thread Nathan Fontenot
On 11/12/2017 06:43 AM, Michael Ellerman wrote: > Hi Nathan, > > Nathan Fontenot writes: >> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c >> index f83056297441..917184c13890 100644 >> --- a/arch/powerpc/kernel/prom.c >> +++ b/arch/po

Re: [PATCH] [net-next,v3] ibmvnic: Feature implementation of Vital Product Data (VPD) for the ibmvnic driver

2017-11-10 Thread Nathan Fontenot
On 11/10/2017 08:41 AM, Desnes Augusto Nunes do Rosário wrote: > > > On 11/09/2017 06:31 PM, Nathan Fontenot wrote: >> On 11/09/2017 01:00 PM, Desnes Augusto Nunes do Rosario wrote: >>> This patch implements and enables VDP support for the ibmvnic driver. >&

Re: [PATCH] [net-next,v3] ibmvnic: Feature implementation of Vital Product Data (VPD) for the ibmvnic driver

2017-11-09 Thread Nathan Fontenot
On 11/09/2017 01:00 PM, Desnes Augusto Nunes do Rosario wrote: > This patch implements and enables VDP support for the ibmvnic driver. > Moreover, it includes the implementation of suitable structs, signal > transmission/handling and functions which allows the retrival of firmware > information f

Re: [PATCH v2 3/8] powerpc/mm: Separate ibm, dynamic-memory data from DT format

2017-10-24 Thread Nathan Fontenot
On 10/24/2017 01:08 AM, Michael Ellerman wrote: > Nathan Fontenot writes: > >> diff --git a/arch/powerpc/mm/drmem.c b/arch/powerpc/mm/drmem.c >> new file mode 100644 >> index ..8ad7cf36b2c4 >> --- /dev/null >> +++ b/arch/powerpc/mm/drmem.c >&

[PATCH v2 8/8] powerpc: Enable support of ibm,dynamic-memory-v2

2017-10-20 Thread Nathan Fontenot
Add required bits to the architecture vector to enable support of the ibm,dynamic-memory-v2 device tree property. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/firmware.h |3 ++- arch/powerpc/include/asm/prom.h |1 + arch/powerpc/kernel/prom_init.c

[PATCH v2 7/8] powerpc/pseries: Add support for ibm, dynamic-memory-v2 property

2017-10-20 Thread Nathan Fontenot
tree property in this format. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/drmem.h | 12 ++ arch/powerpc/mm/drmem.c | 188 ++ 2 files changed, 182 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/include/asm/drmem.h b/arch

[PATCH v2 6/8] powerpc: Move of_drconf_cell struct to asm/drmem.h

2017-10-20 Thread Nathan Fontenot
for version 2 of the dynamic reconfiguration property. Signed-off-by: Nathan Fontenot --- arch/powerpc/include/asm/drmem.h| 18 ++ arch/powerpc/include/asm/prom.h | 16 arch/powerpc/mm/drmem.c |4

[PATCH v2 5/8] powerpc/pseries: Update memory hotplug code to use drmem LMB array

2017-10-20 Thread Nathan Fontenot
proper device tree format and generate a properly formatted device tree property. Signed-off-by: Nathan Fontenot --- Updates for V2: Correct build issues with uninitialized variables --- arch/powerpc/include/asm/drmem.h| 18 + arch/powerpc/mm/drmem.c

[PATCH v2 4/8] powerpc/numa: Update numa code use drmem LMB array

2017-10-20 Thread Nathan Fontenot
LMB information. This patch also prepares the numa code for support of the version 2 dynamic reconfiguration memory property. Signed-off-by: Nathan Fontenot --- Updates for V2: Removed unused device node paramter to numa_setup_drmem_lmbs() and hot_add_drconf_scn_to_nid(). --- arch/powerpc

  1   2   3   4   5   6   7   8   >