On Tue, Nov 28, 2023 at 04:50:05PM +0100, Laurent CARON wrote:
> Le 28/11/2023 à 12:12, Claudio Jeker a écrit :
> > So the problem is that the malloc space is filled by
> > a) 26540K of devbuf -- because of the multiqueue support in ixl
> > b) 63493K of ACPI -- what the heck ACPI?!?
> > and then there is not enough space for rtable. A full table requires
> > in your example 50816K of rtable malloc space.
> > 
> > Now on amd64 all of this needs to fit into 128MB which is impossible.
> > 
> > You can use config(8) and bsd.re-config(5) to adjust the nkmempg variable
> > to something like 131072 (which is 4 times the default size).
> > This can be verified with `sysctl vm.nkmempages`
> > 
> > Now ixl(4) and ACPI should not be such pigs but in the end 128MB of kernel
> > malloc space is just stupidly small on a system with 128GB of memory.
> 
> 
> Hi Claudio,
> 
> Thanks.
> 
> I bumped nkmempg to 131072
> 
> ====
> 
> # config -e -o bsd.new /bsd
> 
> ukc> nkmempg 131072
> 
> quit
> 
> ====
> 
> Then rebooted with the very same issue.
> 
> It seems the nkmempg variable is not properly takes into account since
> 'sysctl vm.nkmempages' still shows 32768 after reboot
> 
> ====
> 
> # sysctl vm.nkmempages vm.nkmempages=32768
> 
> ====
> 
> # config -e -o bsd.new /bsd OpenBSD 7.4 (GENERIC.MP) #0: Sun Oct 22 12:13:42
> MDT 2023
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> Enter 'help' for information ukc> nkmempg nkmempages = 262144 ====
> 
> Modifying /etc/bsd.re-config and rebooting (twice) didn't help either.
> 
> I 'had'to recompile kernel (after modifying: /usr/src/sys/kern/kern_malloc.c
> with '#define NKMEMPAGES 262144 '), the issue is not occuring again.
> 
> Do you recomend using this approach to mitigate the issue, or is there a
> more 'long term' fix ?

The problem is that the symbol nkmempages moved into .bss and is therefor
no longer modifiable by config(8). I think you can still use ukc via
boot -c to alter it (but that is not sticky).

The alternative is to set "option NKMEMPAGES=131072" in your GENERIC
config file (or option NKMEMPAGES_MAX=131072). See also options(4).

Long term is the fix this proper. All of this was built when computers had
100MB of memory not 100GB.

-- 
:wq Claudio

Reply via email to