All of lore.kernel.org
 help / color / mirror / Atom feed
* early alloc change broke sh
@ 2018-05-11  0:01 ` Rich Felker
  0 siblings, 0 replies; 4+ messages in thread
From: Rich Felker @ 2018-05-11  0:01 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-kernel, linux-sh

Since commit 0fa1c579349fdd90173381712ad78aa99c09d38b (of/fdt: use
memblock_virt_alloc for early alloc), attempting to boot on sh (j2,
nommu) fails with OOM:

[    0.000000] bootmem alloc of 7836 bytes failed!
[    0.000000] Kernel panic - not syncing: Out of memory

I suspect there are significant differences in memblock_virt_alloc and
memblock_alloc (perhaps specific to nommu?). It looks like microblaze
was also affected:

http://lkml.iu.edu/hypermail/linux/kernel/1801.1/02200.html

I'll continue looking for a solution but I wanted to let you know
right away in case you might know what's wrong and have a fix. It
would be nice if we could get a fix for this regression in 4.17 since
multiple archs are broken.

Rich

^ permalink raw reply	[flat|nested] 4+ messages in thread

* early alloc change broke sh
@ 2018-05-11  0:01 ` Rich Felker
  0 siblings, 0 replies; 4+ messages in thread
From: Rich Felker @ 2018-05-11  0:01 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-kernel, linux-sh

Since commit 0fa1c579349fdd90173381712ad78aa99c09d38b (of/fdt: use
memblock_virt_alloc for early alloc), attempting to boot on sh (j2,
nommu) fails with OOM:

[    0.000000] bootmem alloc of 7836 bytes failed!
[    0.000000] Kernel panic - not syncing: Out of memory

I suspect there are significant differences in memblock_virt_alloc and
memblock_alloc (perhaps specific to nommu?). It looks like microblaze
was also affected:

http://lkml.iu.edu/hypermail/linux/kernel/1801.1/02200.html

I'll continue looking for a solution but I wanted to let you know
right away in case you might know what's wrong and have a fix. It
would be nice if we could get a fix for this regression in 4.17 since
multiple archs are broken.

Rich

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: early alloc change broke sh
  2018-05-11  0:01 ` Rich Felker
@ 2018-05-11  2:06   ` Rich Felker
  -1 siblings, 0 replies; 4+ messages in thread
From: Rich Felker @ 2018-05-11  2:06 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-kernel, linux-sh

On Thu, May 10, 2018 at 08:01:28PM -0400, Rich Felker wrote:
> Since commit 0fa1c579349fdd90173381712ad78aa99c09d38b (of/fdt: use
> memblock_virt_alloc for early alloc), attempting to boot on sh (j2,
> nommu) fails with OOM:
> 
> [    0.000000] bootmem alloc of 7836 bytes failed!
> [    0.000000] Kernel panic - not syncing: Out of memory
> 
> I suspect there are significant differences in memblock_virt_alloc and
> memblock_alloc (perhaps specific to nommu?). It looks like microblaze
> was also affected:
> 
> http://lkml.iu.edu/hypermail/linux/kernel/1801.1/02200.html
> 
> I'll continue looking for a solution but I wanted to let you know
> right away in case you might know what's wrong and have a fix. It
> would be nice if we could get a fix for this regression in 4.17 since
> multiple archs are broken.

The problem seems to be that a working memblock_virt_alloc depends on:

	#if defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM)

Otherwise, it's a thin wrapper around __alloc_bootmem, which is not
equivalent to the old memblock_alloc call.

Rich

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: early alloc change broke sh
@ 2018-05-11  2:06   ` Rich Felker
  0 siblings, 0 replies; 4+ messages in thread
From: Rich Felker @ 2018-05-11  2:06 UTC (permalink / raw)
  To: Rob Herring; +Cc: linux-kernel, linux-sh

On Thu, May 10, 2018 at 08:01:28PM -0400, Rich Felker wrote:
> Since commit 0fa1c579349fdd90173381712ad78aa99c09d38b (of/fdt: use
> memblock_virt_alloc for early alloc), attempting to boot on sh (j2,
> nommu) fails with OOM:
> 
> [    0.000000] bootmem alloc of 7836 bytes failed!
> [    0.000000] Kernel panic - not syncing: Out of memory
> 
> I suspect there are significant differences in memblock_virt_alloc and
> memblock_alloc (perhaps specific to nommu?). It looks like microblaze
> was also affected:
> 
> http://lkml.iu.edu/hypermail/linux/kernel/1801.1/02200.html
> 
> I'll continue looking for a solution but I wanted to let you know
> right away in case you might know what's wrong and have a fix. It
> would be nice if we could get a fix for this regression in 4.17 since
> multiple archs are broken.

The problem seems to be that a working memblock_virt_alloc depends on:

	#if defined(CONFIG_HAVE_MEMBLOCK) && defined(CONFIG_NO_BOOTMEM)

Otherwise, it's a thin wrapper around __alloc_bootmem, which is not
equivalent to the old memblock_alloc call.

Rich

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-11  2:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11  0:01 early alloc change broke sh Rich Felker
2018-05-11  0:01 ` Rich Felker
2018-05-11  2:06 ` Rich Felker
2018-05-11  2:06   ` Rich Felker

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.