]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
acpi: Ensure that adjacent memory affinity table entries are coalesced
authorMark Johnston <markj@FreeBSD.org>
Fri, 18 Dec 2020 16:04:48 +0000 (16:04 +0000)
committerMark Johnston <markj@FreeBSD.org>
Wed, 6 Jan 2021 14:41:09 +0000 (09:41 -0500)
commitf0350417eb3c39c6a03d311da79638fa7cdb0f3c
treec0d56f9bea8cbf4523954eb72f434b2d38310c21
parentf1007ba88d47d5e4911c7cede74d0b8c44fe8248
acpi: Ensure that adjacent memory affinity table entries are coalesced

The SRAT may contain multiple distinct entries that together describe a
contiguous region of physical memory.  In this case we were not
coalescing the corresponding entries in the memory affinity table, which
led to fragmented phys_avail[] entries.  Since r338431 the vm_phys_segs[]
entries derived from phys_avail[] will be coalesced, resulting in a
situation where vm_phys_segs[] entries do not have a covering
phys_avail[] entry.  vm_page_startup() will not add such segments to the
physical memory allocator, leaving them unused.

Reported by: Don Morris <dgmorris@earthlink.net>
Reviewed by: kib, vangyzen

(cherry picked from commit 0f8b212a1e41d6eabf2a17442bcbe4f128f023f8)
sys/dev/acpica/acpi_pxm.c