]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vm_phys: do not ignore phys_avail[] segments that do not fit completely into vm_phys...
authorKonstantin Belousov <kib@FreeBSD.org>
Tue, 14 Sep 2021 12:25:37 +0000 (15:25 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Thu, 16 Sep 2021 17:01:19 +0000 (20:01 +0300)
commit181bfb42fd01bfa9f4636e803ccb3eeed8ac8ba4
tree5b92f62ca49aa49d4d516d2624d84e66982ed47d
parente8a872536042970b4dbf14dc75755a352fb14488
vm_phys: do not ignore phys_avail[] segments that do not fit completely into vm_phys segments

If phys_avail[] segment only intersect with some vm_phys segment, add
pages from it to the free list that belong to the given vm_phys_seg,
instead of dropping them.

The vm_phys segments are generally result of subdivision of phys_avail
segments, for instance DMA32 or LOWMEM boundaries split them. On
amd64, after UEFI in-place kernel activation (copy_staging disable)
was enabled, we typically have a large phys_avail[] segment below 4G
which crosses LOWMEM (1M) boundary. With the current way of requiring
phys_avail[] fully fit into vm_phys_seg, this memory was ignored.

Reported by: madpilot
Reviewed by: markj
Discussed with: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31958
sys/vm/vm_page.c