freebsd-dev/sys/x86
Konstantin Belousov 94dd54b9a2 Free bootstacks after AP startup.
Bootstacks are unused after APs executed sched_throw() in
init_secondary_tail() and started executing on proper idle thread
stack.  Add sysinit that detects that the idle thread for each CPU was
scheduled at least once, and free corresponding bootstack.

Slight addition of the code (~200 bytes) is compensated by the saving,
because even on typical small modern desktop CPU we leak 128K of
memory otherwise (4 pages x 8 threads).

Reviewed by:	jhb
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D18486
2018-12-11 02:54:36 +00:00
..
acpica acpica : move SRAT/SLIT parsing to sys/dev/acpica 2018-12-08 19:10:58 +00:00
bios sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
cpufreq cpufreq: Remove error-prone table terminators in favor of automatic sizing 2018-04-14 03:15:05 +00:00
include Add definitions for Intel Speed Shift 2018-11-21 00:21:58 +00:00
iommu Add malloc_domainset(9) and _domainset variants to other allocator KPIs. 2018-10-30 18:26:34 +00:00
isa Fix a regression in r338360 when booting an x86 machine without APIC. 2018-09-17 17:18:54 +00:00
pci Add pci_early function to detect Intel stolen memory. 2018-10-31 23:17:00 +00:00
x86 Free bootstacks after AP startup. 2018-12-11 02:54:36 +00:00
xen Axe MINIMUM_MSI_INT. 2018-11-16 23:39:39 +00:00