Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1491381

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

From "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node
Date 2016-09-26 17:50 +0200
Message-ID <slGki-5BO-29@gated-at.bofh.it> (permalink)
References <slmvf-1Fh-7@gated-at.bofh.it> <slmvf-1Fh-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Reza Arbab <arbab@linux.vnet.ibm.com> writes:

> At boot, the movable_node option sets bottom-up memblock allocation.
>
> This reduces the chance that, in the window before movable memory has
> been identified, an allocation for the kernel might come from a movable
> node. By going bottom-up, early allocations will most likely come from
> the same node as the kernel image, which is necessarily in a nonmovable
> node.
>
> Then, once any known hotplug memory has been marked, allocation can be
> reset back to top-down. On x86, this is done in numa_init(). This patch
> does the same on power, in numa initmem_init().
>
> Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com>
> ---
>  arch/powerpc/mm/numa.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
> index d7ac419..fdf1e69 100644
> --- a/arch/powerpc/mm/numa.c
> +++ b/arch/powerpc/mm/numa.c
> @@ -945,6 +945,9 @@ void __init initmem_init(void)
>  	max_low_pfn = memblock_end_of_DRAM() >> PAGE_SHIFT;
>  	max_pfn = max_low_pfn;
>
> +	/* bottom-up allocation may have been set by movable_node */
> +	memblock_set_bottom_up(false);
> +

By then we have done few memblock allocation right ? IMHO, we should do
this early enough in prom.c after we do parse_early_param, with a
comment there explaining that, we don't really support hotplug memblock
and when we do that, this should be moved to a place where we can handle
memblock allocation such that we avoid spreading memblock allocation to
movable node.


>  	if (parse_numa_properties())
>  		setup_nonnuma();
>  	else
> -- 
> 1.8.3.1

-aneesh

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/5] powerpc/mm: movable hotplug memory nodes Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-09-25 20:40 +0200
  [PATCH v3 2/5] drivers/of: do not add memory for unavailable nodes Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-09-25 20:40 +0200
  [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-09-25 20:40 +0200
    Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2016-09-26 17:50 +0200
      Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when  using movable_node Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-09-26 22:50 +0200
    Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when  using movable_node Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2016-09-26 23:20 +0200
      Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when  using movable_node Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-09-27 02:20 +0200
        Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using  movable_node Balbir Singh <bsingharora@gmail.com> - 2016-10-04 02:50 +0200
          Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when  using movable_node Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-10-04 22:30 +0200
  [PATCH v3 3/5] powerpc/mm: allow memory hotplug into a memoryless node Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-09-25 20:40 +0200
  [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-09-25 20:40 +0200
    Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2016-09-26 17:50 +0200
    Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc Benjamin Herrenschmidt <benh@kernel.crashing.org> - 2016-09-26 23:20 +0200
      Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-09-27 02:20 +0200
  [PATCH v3 1/5] drivers/of: introduce of_fdt_is_available() Reza Arbab <arbab@linux.vnet.ibm.com> - 2016-09-25 20:40 +0200
    Re: [PATCH v3 1/5] drivers/of: introduce of_fdt_is_available() Rob Herring <robh+dt@kernel.org> - 2016-10-03 17:30 +0200

csiph-web