Re: kswapd0: page allocation failure: order:0, mode:0x820(GFP_ATOMIC), nodemask=(null),cpuset=/,mems_allowed=0 (Kernel v6.5.9, 32bit ppc)

From: Erhard Furtner
Date: Thu Jun 06 2024 - 12:06:04 EST


On Thu, 06 Jun 2024 22:08:40 +1000
Michael Ellerman <mpe@xxxxxxxxxxxxxx> wrote:

> It's a bit more complicated, in order to increase LOWMEM_SIZE you need
> to adjust all the other variables to make space.
>
> To get 2G of user virtual space I think you need:
>
> CONFIG_ADVANCED_OPTIONS=y
> CONFIG_LOWMEM_SIZE_BOOL=y
> CONFIG_LOWMEM_SIZE=0x60000000
> CONFIG_PAGE_OFFSET_BOOL=y
> CONFIG_PAGE_OFFSET=0x90000000
> CONFIG_KERNEL_START_BOOL=y
> CONFIG_KERNEL_START=0x90000000
> CONFIG_PHYSICAL_START=0x00000000
> CONFIG_TASK_SIZE_BOOL=y
> CONFIG_TASK_SIZE=0x80000000
>
> Which results in 1.5GB of lowmem.

Booting this config on the G4 worked, but the issue showed up anyhow.

> Or if you want to map all 2G of RAM directly in the kernel without
> highmem, but limit user virtual space to 1.5G:
>
> CONFIG_ADVANCED_OPTIONS=y
> CONFIG_LOWMEM_SIZE_BOOL=y
> CONFIG_LOWMEM_SIZE=0x80000000
> CONFIG_PAGE_OFFSET_BOOL=y
> CONFIG_PAGE_OFFSET=0x70000000
> CONFIG_KERNEL_START_BOOL=y
> CONFIG_KERNEL_START=0x70000000
> CONFIG_PHYSICAL_START=0x00000000
> CONFIG_TASK_SIZE_BOOL=y
> CONFIG_TASK_SIZE=0x60000000

This actually did the trick!

Also I disabled highmem via HIGHMEM=n. With this config the machine did run the "stress-ng --vm 2 --vm-bytes 1930M --verify -v" load for about 2 hrs without hitting the issue.

> You can also reclaim another 256MB of virtual space if you disable
> CONFIG_MODULES.

Did not try that 'cause the 2nd config worked.

Working 2G_no-highmem .config attached and the dmesg of both configs attached.

Regards,
Erhard

Attachment: dmesg_610-rc2_g4_2G_no-highmem
Description: Binary data

Attachment: config_610-rc2_g4_2G_no-highmem
Description: Binary data

Attachment: dmesg_610-rc2_g4_1.5G_lowmem
Description: Binary data