]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Include the psind in data returned by mincore(2).
authorMark Johnston <markj@FreeBSD.org>
Wed, 2 Sep 2020 18:16:43 +0000 (18:16 +0000)
committerMark Johnston <markj@FreeBSD.org>
Wed, 2 Sep 2020 18:16:43 +0000 (18:16 +0000)
commit847ab36bf22766020077f06f6a8d278f8b081655
tree039e24912a42c2379afa8cc204f216d3bdbb76d9
parent2825bf5b2a209d626a50e97ce98d508464d32366
Include the psind in data returned by mincore(2).

Currently we use a single bit to indicate whether the virtual page is
part of a superpage.  To support a forthcoming implementation of
non-transparent 1GB superpages, it is useful to provide more detailed
information about large page sizes.

The change converts MINCORE_SUPER into a mask for MINCORE_PSIND(psind)
values, indicating a mapping of size psind, where psind is an index into
the pagesizes array returned by getpagesizes(3), which in turn comes
from the hw.pagesizes sysctl.  MINCORE_PSIND(1) is equal to the old
value of MINCORE_SUPER.

For now, two bits are used to record the page size, permitting values
of MAXPAGESIZES up to 4.

Reviewed by: alc, kib
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D26238
lib/libc/sys/mincore.2
sys/amd64/amd64/pmap.c
sys/arm/arm/pmap-v6.c
sys/arm64/arm64/pmap.c
sys/i386/i386/pmap.c
sys/powerpc/aim/mmu_radix.c
sys/riscv/riscv/pmap.c
sys/sys/mman.h
sys/vm/vm_mmap.c