diff mbox

[v2,3/3] m68k: switch to MEMBLOCK + NO_BOOTMEM

Message ID 20180704075410.GF22503@dhcp22.suse.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Hocko July 4, 2018, 7:54 a.m. UTC
On Wed 04-07-18 09:44:14, Geert Uytterhoeven wrote:
[...]
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 0 at mm/memblock.c:230
> memblock_find_in_range_node+0x11c/0x1be
> memblock: bottom-up allocation failed, memory hotunplug may be affected

This only means that hotplugable memory might contain non-movable memory
now. But does your system even support memory hotplug. I would be really
surprised. So I guess we just want this instead

Comments

Geert Uytterhoeven July 4, 2018, 8:21 a.m. UTC | #1
Hi Michael,

On Wed, Jul 4, 2018 at 9:54 AM Michal Hocko <mhocko@kernel.org> wrote:
> On Wed 04-07-18 09:44:14, Geert Uytterhoeven wrote:
> [...]
> > ------------[ cut here ]------------
> > WARNING: CPU: 0 PID: 0 at mm/memblock.c:230
> > memblock_find_in_range_node+0x11c/0x1be
> > memblock: bottom-up allocation failed, memory hotunplug may be affected
>
> This only means that hotplugable memory might contain non-movable memory
> now. But does your system even support memory hotplug. I would be really

No it doesn't.

> surprised. So I guess we just want this instead
> diff --git a/mm/memblock.c b/mm/memblock.c
> index cc16d70b8333..c0dde95593fd 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -228,7 +228,8 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t size,
>                  * so we use WARN_ONCE() here to see the stack trace if
>                  * fail happens.
>                  */
> -               WARN_ONCE(1, "memblock: bottom-up allocation failed, memory hotunplug may be affected\n");
> +               WARN_ONCE(IS_ENABLED(CONFIG_MEMORY_HOTREMOVE),
> +                                       "memblock: bottom-up allocvation failed, memory hotunplug may be affected\n");
>         }
>
>         return __memblock_find_range_top_down(start, end, size, align, nid,

Thanks, that does the trick!

Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert
Vlastimil Babka July 4, 2018, 12:22 p.m. UTC | #2
On 07/04/2018 09:54 AM, Michal Hocko wrote:
> On Wed 04-07-18 09:44:14, Geert Uytterhoeven wrote:
> [...]
>> ------------[ cut here ]------------
>> WARNING: CPU: 0 PID: 0 at mm/memblock.c:230
>> memblock_find_in_range_node+0x11c/0x1be
>> memblock: bottom-up allocation failed, memory hotunplug may be affected
> 
> This only means that hotplugable memory might contain non-movable memory
> now. But does your system even support memory hotplug. I would be really
> surprised. So I guess we just want this instead
> diff --git a/mm/memblock.c b/mm/memblock.c
> index cc16d70b8333..c0dde95593fd 100644
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -228,7 +228,8 @@ phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t size,
>  		 * so we use WARN_ONCE() here to see the stack trace if
>  		 * fail happens.
>  		 */
> -		WARN_ONCE(1, "memblock: bottom-up allocation failed, memory hotunplug may be affected\n");
> +		WARN_ONCE(IS_ENABLED(CONFIG_MEMORY_HOTREMOVE),
> +					"memblock: bottom-up allocvation failed, memory hotunplug may be affected\n");
                                                             ^ allocation               ^ hotremove
Makes sense, though.

>  	}
>  
>  	return __memblock_find_range_top_down(start, end, size, align, nid,
>
diff mbox

Patch

diff --git a/mm/memblock.c b/mm/memblock.c
index cc16d70b8333..c0dde95593fd 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -228,7 +228,8 @@  phys_addr_t __init_memblock memblock_find_in_range_node(phys_addr_t size,
 		 * so we use WARN_ONCE() here to see the stack trace if
 		 * fail happens.
 		 */
-		WARN_ONCE(1, "memblock: bottom-up allocation failed, memory hotunplug may be affected\n");
+		WARN_ONCE(IS_ENABLED(CONFIG_MEMORY_HOTREMOVE),
+					"memblock: bottom-up allocvation failed, memory hotunplug may be affected\n");
 	}
 
 	return __memblock_find_range_top_down(start, end, size, align, nid,