opnsense-src/sys/compat/linuxkpi/common/include/asm
Bjoern A. Zeeb 7730aec6b7 LinuxKPI: reduce impact of large MAXCPU
Start scaling arrays dynamically instead of using MAXCPU, resulting in
extra allocations on startup but reducing the overall memory footprint.
For the static single CPU mask we provide two versions to further save
memory depending on a low or high CPU count system.  The threshold to
switch is currently at 128 CPUs on 64bit platforms.
More detailed comments on the implementations can be found in the code.

If I am not wrong on a MAXCPU=65536 system the memory footprint should
roughly go down from 512M to 1.5M for the static single CPU mask.

Submitted by:	olce (most of this final version)
Sponsored by:	The FreeBSD Foundation
PR:		274316
Differential Revision: https://reviews.freebsd.org/D42345

(cherry picked from commit 488e8a7faca51a71987fbf00cd36cfcd19269db7)
2024-02-18 16:41:24 +00:00
..
fpu spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
atomic-long.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
atomic.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
atomic64.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
barrier.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
byteorder.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
cpufeature.h LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards 2022-01-10 22:49:38 +03:00
fcntl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hypervisor.h LinuxKPI: Add asm/hypervisor.h header 2024-02-17 23:58:37 +03:00
intel-family.h linuxkpi: Add alderlake defines in intel-family 2023-03-28 10:57:13 +02:00
io.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
iosf_mbi.h linuxkpi: Add asm/iosfmbi.h 2022-06-29 09:55:19 +02:00
memtype.h linuxkpi: Define pat_enabled() 2023-03-21 23:36:40 +01:00
msr.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
neon.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
pgtable.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
processor.h LinuxKPI: reduce impact of large MAXCPU 2024-02-18 16:41:24 +00:00
set_memory.h linuxkpi: Fix uses of pmap_change_attr() 2024-02-17 23:58:34 +03:00
smp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
types.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
uaccess.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
unaligned.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00