Subject: kernel kva allocation changes
To: None <tech-kern@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 01/07/2007 19:35:09
hi,

i'd like to make the following changes.  any comments?

- make vmem independent from kmem_map.

- have a vmem arena which covers the entire kva, say, kernel_va_arena.

	- make it interrupt-safe, so that it's trivial to make
	  kmem_alloc/free interrupt-safe.

	- to serve kva allocations, use it instead of kernel_map.
	  (pageable allocations needs to be registered to kernel_map as well
	  for fault handling.)

	- PMAP_PREFER equivalent can be done with vmem's align/phase, i think.

- uvm_km_alloc/free

	- vmem_(x?)alloc/free from kernel_va_arena, unless pageable requests.

	- probably handle PMAP_MAP_POOLPAGE here and remove
	  uvm_km_alloc_poolpage and friends.

- malloc/free

	- make them wrappers of kmem_alloc/free for now.

	- remove kmem_map.

- advantages and disadvantages

	- better utilization of kva.

	- fix PR/34892.

	- can remove mb_map as well.

	- simplify vm_map_entry allocations.  otoh, complicate subr_vmem.c.

	- can't support map entry splitting in kernel_map.

YAMAMOTO Takashi