Message ID | 1470680843-28702-4-git-send-email-arbab@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On 09/08/16 04:27, Reza Arbab wrote: > Remove the check which prevents us from hotplugging into an empty node. > > Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> > --- > arch/powerpc/mm/numa.c | 13 +------------ > 1 file changed, 1 insertion(+), 12 deletions(-) > > diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c > index 80d067d..bc70c4f 100644 > --- a/arch/powerpc/mm/numa.c > +++ b/arch/powerpc/mm/numa.c > @@ -1127,7 +1127,7 @@ static int hot_add_node_scn_to_nid(unsigned long scn_addr) > int hot_add_scn_to_nid(unsigned long scn_addr) > { > struct device_node *memory = NULL; > - int nid, found = 0; > + int nid; > Do we want to do this only for ibm,hotplug-aperture compatible ranges? I'm OK either ways Acked-by: Balbir Singh <bsingharora@gmail.com>
On Fri, Aug 12, 2016 at 11:50:43AM +1000, Balbir Singh wrote: >On 09/08/16 04:27, Reza Arbab wrote: >> Remove the check which prevents us from hotplugging into an empty node. > >Do we want to do this only for ibm,hotplug-aperture compatible ranges? We could, but since past discussions and current testing have been unable to justify preventing hotplug to a memoryless node in the first place, I'm inclined to keep things simple. If some edge case is discovered, making it conditional as you describe will be a good solution. Thanks for your review! A v2 of this set is pending my investigation of Michael's suggestion to get node hotadd working.
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 80d067d..bc70c4f 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -1127,7 +1127,7 @@ static int hot_add_node_scn_to_nid(unsigned long scn_addr) int hot_add_scn_to_nid(unsigned long scn_addr) { struct device_node *memory = NULL; - int nid, found = 0; + int nid; if (!numa_enabled || (min_common_depth < 0)) return first_online_node; @@ -1143,17 +1143,6 @@ int hot_add_scn_to_nid(unsigned long scn_addr) if (nid < 0 || !node_online(nid)) nid = first_online_node; - if (NODE_DATA(nid)->node_spanned_pages) - return nid; - - for_each_online_node(nid) { - if (NODE_DATA(nid)->node_spanned_pages) { - found = 1; - break; - } - } - - BUG_ON(!found); return nid; }
Remove the check which prevents us from hotplugging into an empty node. Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com> --- arch/powerpc/mm/numa.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)