Index: uvm_init.c =================================================================== RCS file: /cvs/src/sys/uvm/uvm_init.c,v retrieving revision 1.39 diff -u -p -r1.39 uvm_init.c --- uvm_init.c 14 Mar 2015 03:38:53 -0000 1.39 +++ uvm_init.c 3 May 2017 11:54:19 -0000 @@ -114,30 +114,35 @@ uvm_init(void) pmap_init(); /* - * step 6: init the kernel memory allocator. after this call the + * step 6: init uvm_km_page allocator memory. + */ + uvm_km_page_init(); + + /* + * step 7: init the kernel memory allocator. after this call the * kernel memory allocator (malloc) can be used. */ kmeminit(); /* - * step 6.5: init the dma allocator, which is backed by pools. + * step 7.5: init the dma allocator, which is backed by pools. */ dma_alloc_init(); /* - * step 7: init all pagers and the pager_map. + * step 8: init all pagers and the pager_map. */ uvm_pager_init(); /* - * step 8: init anonymous memory system + * step 9 init anonymous memory system */ amap_init(); /* - * step 9: init uvm_km_page allocator memory. + * step 10: start uvm_km_page allocator thread. */ - uvm_km_page_init(); + uvm_km_page_thread(); /* * the VM system is now up! now that malloc is up we can Index: uvm_km.c =================================================================== RCS file: /cvs/src/sys/uvm/uvm_km.c,v retrieving revision 1.128 diff -u -p -r1.128 uvm_km.c --- uvm_km.c 26 Sep 2015 17:55:00 -0000 1.128 +++ uvm_km.c 3 May 2017 11:54:19 -0000 @@ -605,6 +605,12 @@ uvm_km_page_init(void) /* nothing */ } +void +uvm_km_page_thread(void) +{ + /* nothing */ +} + #else /* * uvm_km_page allocator, non __HAVE_PMAP_DIRECT archs @@ -678,7 +684,11 @@ uvm_km_page_init(void) /* tone down if really high */ if (uvm_km_pages.lowat > 512) uvm_km_pages.lowat = 512; +} +void +uvm_km_page_thread(void) +{ kthread_create_deferred(uvm_km_createthread, NULL); } Index: uvm_km.h =================================================================== RCS file: /cvs/src/sys/uvm/uvm_km.h,v retrieving revision 1.14 diff -u -p -r1.14 uvm_km.h --- uvm_km.h 7 Feb 2015 08:21:24 -0000 1.14 +++ uvm_km.h 3 May 2017 11:54:19 -0000 @@ -45,6 +45,7 @@ void uvm_km_init(vaddr_t, vaddr_t, vaddr_t); void uvm_km_page_init(void); +void uvm_km_page_thread(void); void uvm_km_pgremove(struct uvm_object *, vaddr_t, vaddr_t); void uvm_km_pgremove_intrsafe(vaddr_t, vaddr_t);