From ed8f5e8d82ace15e4cefca2c82941b15cb1a7830 Mon Sep 17 00:00:00 2001 From: mpi Date: Sat, 24 Aug 2024 10:47:59 +0000 Subject: [PATCH] Remove documentation for no longer existing or mostly unused allocators. ok guenther@ --- share/man/man9/uvm_km_alloc.9 | 99 ++-------------------------------- share/man/man9/uvm_pagealloc.9 | 7 +-- 2 files changed, 7 insertions(+), 99 deletions(-) diff --git a/share/man/man9/uvm_km_alloc.9 b/share/man/man9/uvm_km_alloc.9 index b39c81eca9f..7f1e984903f 100644 --- a/share/man/man9/uvm_km_alloc.9 +++ b/share/man/man9/uvm_km_alloc.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: uvm_km_alloc.9,v 1.2 2019/12/05 15:58:27 jmc Exp $ +.\" $OpenBSD: uvm_km_alloc.9,v 1.3 2024/08/24 10:47:59 mpi Exp $ .\" $NetBSD: uvm.9,v 1.14 2000/06/29 06:08:44 mrg Exp $ .\" .\" Copyright (c) 1998 Matthew R. Green @@ -25,104 +25,21 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: December 5 2019 $ -.Dt UVM_KM_ALLOC 9 +.Dd $Mdocdate: August 24 2024 $ +.Dt UVM_KM_SUBALLOC 9 .Os .Sh NAME -.Nm uvm_km_alloc , -.Nm uvm_km_zalloc , -.Nm uvm_km_alloc1 , -.Nm uvm_km_kmemalloc , -.Nm uvm_km_valloc , -.Nm uvm_km_valloc_wait , .Nm uvm_km_suballoc , -.Nm uvm_km_free , -.Nm uvm_km_free_wakeup +.Nm uvm_km_free .Nd raw kernel memory or address space allocator .Sh SYNOPSIS .In sys/param.h .In uvm/uvm.h -.Ft vaddr_t -.Fn uvm_km_alloc "vm_map_t map" "vsize_t size" -.Ft vaddr_t -.Fn uvm_km_zalloc "vm_map_t map" "vsize_t size" -.Ft vaddr_t -.Fn uvm_km_alloc1 "vm_map_t map" "vsize_t size" "vsize_t align" "boolean_t zeroit" -.Ft vaddr_t -.Fn uvm_km_kmemalloc "vm_map_t map" "struct uvm_object *obj" "vsize_t size" "int flags" -.Ft vaddr_t -.Fn uvm_km_valloc "vm_map_t map" "vsize_t size" -.Ft vaddr_t -.Fn uvm_km_valloc_wait "vm_map_t map" "vsize_t size" -.Ft struct vm_map * .Fn uvm_km_suballoc "vm_map_t map" "vaddr_t *min" "vaddr_t *max " "vsize_t size" "int flags" "boolean_t fixed" "vm_map_t submap" .Ft void .Fn uvm_km_free "vm_map_t map" "vaddr_t addr" "vsize_t size" -.Ft void -.Fn uvm_km_free_wakeup "vm_map_t map" "vaddr_t addr" "vsize_t size" .Sh DESCRIPTION The -.Fn uvm_km_alloc -and -.Fn uvm_km_zalloc -functions allocate -.Fa size -bytes of wired kernel memory in map -.Fa map . -In addition to allocation, -.Fn uvm_km_zalloc -zeros the memory. -Both of these functions are defined as macros in terms of -.Fn uvm_km_alloc1 , -and should almost always be used in preference to -.Fn uvm_km_alloc1 . -.Pp -The -.Fn uvm_km_alloc1 -function allocates and returns -.Fa size -bytes of wired memory in the kernel map aligned to the -.Fa align -boundary, zeroing the memory if the -.Fa zeroit -argument is non-zero. -.Pp -The -.Fn uvm_km_kmemalloc -function allocates and returns -.Fa size -bytes of wired kernel memory into -.Fa obj . -The flags can be any of: -.Bd -literal -#define UVM_KMF_NOWAIT 0x1 /* matches M_NOWAIT */ -#define UVM_KMF_VALLOC 0x2 /* allocate VA only */ -#define UVM_KMF_TRYLOCK UVM_FLAG_TRYLOCK /* try locking only */ -.Ed -.Pp -The -.Dv UVM_KMF_NOWAIT -flag causes -.Fn uvm_km_kmemalloc -to return immediately if no memory is available. -.Dv UVM_KMF_VALLOC -causes no pages to be allocated, only a virtual address. -.Dv UVM_KMF_TRYLOCK -causes -.Fn uvm_km_kmemalloc -to only try and not sleep when locking maps. -.Pp -The -.Fn uvm_km_valloc -and -.Fn uvm_km_valloc_wait -functions return a newly allocated zero-filled address in the kernel map of size -.Fa size . -.Fn uvm_km_valloc_wait -will also wait for kernel memory to become available, if there is a -memory shortage. -.Pp -The .Fn uvm_km_suballoc function allocates submap (with the specified .Fa flags , @@ -150,15 +67,9 @@ and .Pp The .Fn uvm_km_free -and -.Fn uvm_km_free_wakeup -functions free +function free .Fa size bytes of memory in the kernel map, starting at address .Fa addr . -.Fn uvm_km_free_wakeup -calls -.Fn wakeup -on the map before unlocking the map. .Sh SEE ALSO .Xr km_alloc 9 diff --git a/share/man/man9/uvm_pagealloc.9 b/share/man/man9/uvm_pagealloc.9 index 33b725a7570..b50a6bac2b4 100644 --- a/share/man/man9/uvm_pagealloc.9 +++ b/share/man/man9/uvm_pagealloc.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: uvm_pagealloc.9,v 1.2 2019/12/05 15:58:27 jmc Exp $ +.\" $OpenBSD: uvm_pagealloc.9,v 1.3 2024/08/24 10:47:59 mpi Exp $ .\" $NetBSD: uvm.9,v 1.14 2000/06/29 06:08:44 mrg Exp $ .\" .\" Copyright (c) 1998 Matthew R. Green @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: December 5 2019 $ +.Dd $Mdocdate: August 24 2024 $ .Dt UVM_PAGEALLOC 9 .Os .Sh NAME @@ -164,6 +164,3 @@ and .Fa end of the physical addresses of the segment, and the available start and end addresses of pages not already in use. -.\" XXX expand on "system boot time"! -.Sh SEE ALSO -.Xr uvm_km_alloc 9 -- 2.20.1