You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This report is inspired by raspberrypi/linux#6273 and the not so sympathetic reaction to it on the Linux kernel mailing list.
I attempted to accomplish what fake NUMA implementation in the patch did by overriding memory settings on the device tree using an overlay. I'd assume this to accomplish the task on my RPi 5 with 8 GB of RAM:
The issue here is that reg in /memory@0 apparently can't be overridden, or at least I failed at that, although numa-node-ids work.
Thus, I have two suggestions:
Allow memory size on region to be overridden (and possibly intelligently carve a hole in it if there's reserved memory on the region).
Even better, expose separate memory banks as separate memory regions, possibly even with numa-node-ids. Since memory information is read in the kernel very early in the boot process, this would be the most convenient way to balance memory allocations across banks without particularly intrusive (or any!) changes to the kernel mainline.
Of course this behaviour could be controlled by a bootloader configuration flag, if necessary.
The fact that you have to refer to the RAM size when talking about your overlay should give you an idea of why some of the changes from your overlay get overridden: there is one DTB per model of Pi, which the firmware patches to cater for different RAM sizes. There is some potential flexibility about the sequence of DT modifications, but making changes to that sequence often has unexpected consequences.
If you want to experiment with a hand-crafted DTB, you could install U-boot and let it load your DTB and pass it to the kernel unmolested.
Maybe the fact that I consider the above overlay a horrible hack was a bit too much of an implied assumption. Yet, not being able to override the value is at least rather inconsistent behaviour - but I do agree that modifying this might have unintended side effects. There are certainly many possibilities of shooting oneself on the foot with custom overlays already...
If the bootloader would describe separate memory banks as separate memory instances in the device tree it could allow kernel to make more informed decisions without questionable kernel-side patches. Especially if the performance impact of page allocation interleaving between banks on RPi 5 is really as big as implied in some benchmark comments.
Describe the bug
This report is inspired by raspberrypi/linux#6273 and the not so sympathetic reaction to it on the Linux kernel mailing list.
I attempted to accomplish what fake NUMA implementation in the patch did by overriding memory settings on the device tree using an overlay. I'd assume this to accomplish the task on my RPi 5 with 8 GB of RAM:
The issue here is that
reg
in/memory@0
apparently can't be overridden, or at least I failed at that, althoughnuma-node-id
s work.Thus, I have two suggestions:
numa-node-id
s. Since memory information is read in the kernel very early in the boot process, this would be the most convenient way to balance memory allocations across banks without particularly intrusive (or any!) changes to the kernel mainline.Of course this behaviour could be controlled by a bootloader configuration flag, if necessary.
Steps to reproduce the behaviour
Attempt using an overlay like
... and see how
numa-node-id
successfully appears on the device tree, butreg
value comes from the bootloader.Device (s)
Raspberry Pi 5
Bootloader configuration.
System
Bootloader logs
No response
USB boot
No response
NVMe boot
No response
Network (TFTP boot)
No response
The text was updated successfully, but these errors were encountered: