freebsd-dev/sys/vm
Konstantin Belousov 8a945d109c Reintroduce the r196640, after fixing the problem with my testing.
Remove the altkstacks, instead instantiate threads with kernel stack
allocated with the right size from the start. For the thread that has
kernel stack cached, verify that requested stack size is equial to the
actual, and reallocate the stack if sizes differ [1].

This fixes the bug introduced by r173361 that was committed several days
after r173004 and consisted of kthread_add(9) ignoring the non-default
kernel stack size.

Also, r173361 removed the caching of the kernel stacks for a non-first
thread in the process. Introduce separate kernel stack cache that keeps
some limited amount of preallocated kernel stacks to lower the latency
of thread allocation. Add vm_lowmem handler to prune the cache on
low memory condition. This way, system with reasonable amount of the
threads get lower latency of thread creation, while still not exhausting
significant portion of KVA for unused kstacks.

Submitted by:	peter [1]
Discussed with:	jhb, julian, peter
Reviewed by:	jhb
Tested by:	pho (and retested according to new test scenarious)
MFC after:	1 week
2009-09-01 11:41:51 +00:00
..
default_pager.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
device_pager.c Extend the device pager to support different memory attributes on different 2009-08-28 14:06:55 +00:00
memguard.c
memguard.h
phys_pager.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
pmap.h Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
redzone.c Fix REDZONE(9) on amd64 and perhaps other 64 bit targets -- ensure the space 2008-08-13 17:32:48 +00:00
redzone.h
sg_pager.c Mark the fake pages constructed by the OBJT_SG pager valid. This was 2009-08-29 02:17:40 +00:00
swap_pager.c Initialize the uip to silence gcc warning that seems to sneak in in some 2009-06-24 09:26:33 +00:00
swap_pager.h
uma_core.c Add support for UMA_SLAB_KERNEL to page_free(). (While I'm here remove an 2009-06-18 07:27:11 +00:00
uma_dbg.c - Make the keg abstraction more complete. Permit a zone to have multiple 2009-01-25 09:11:24 +00:00
uma_dbg.h
uma_int.h - Make the keg abstraction more complete. Permit a zone to have multiple 2009-01-25 09:11:24 +00:00
uma.h - Make the keg abstraction more complete. Permit a zone to have multiple 2009-01-25 09:11:24 +00:00
vm_contig.c Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
vm_extern.h Reintroduce the r196640, after fixing the problem with my testing. 2009-09-01 11:41:51 +00:00
vm_fault.c Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to 2009-07-24 13:50:29 +00:00
vm_glue.c Reintroduce the r196640, after fixing the problem with my testing. 2009-09-01 11:41:51 +00:00
vm_init.c Adjust some variables (mostly related to the buffer cache) that hold 2009-03-09 19:35:20 +00:00
vm_kern.c Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_kern.h
vm_map.c Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to 2009-07-24 13:50:29 +00:00
vm_map.h Implement global and per-uid accounting of the anonymous memory. Add 2009-06-23 20:45:22 +00:00
vm_meter.c Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to 2009-07-24 13:50:29 +00:00
vm_mmap.c - Change mmap() to fail requests with EINVAL that pass a length of 0. This 2009-07-14 19:45:36 +00:00
vm_object.c Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to 2009-07-24 13:50:29 +00:00
vm_object.h Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to 2009-07-24 13:50:29 +00:00
vm_page.c Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to 2009-07-24 13:50:29 +00:00
vm_page.h Eliminate a stale comment and the two remaining uses of the "register" 2009-05-30 22:15:55 +00:00
vm_pageout.c Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to 2009-07-24 13:50:29 +00:00
vm_pageout.h Move the code for doing out-of-memory grass from vm_pageout_scan() 2008-09-29 19:45:12 +00:00
vm_pager.c Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to 2009-07-24 13:50:29 +00:00
vm_pager.h Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar to 2009-07-24 13:50:29 +00:00
vm_param.h
vm_phys.c Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
vm_phys.h Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
vm_reserv.c Previously, when vm_page_free_toq() was performed on a page belonging to 2009-04-11 09:09:00 +00:00
vm_reserv.h
vm_unix.c Remove execute permission from the memory allocated by sbrk(). 2009-04-11 22:34:08 +00:00
vm_zeroidle.c Fill in a few sysctl descriptions. 2008-08-03 14:26:15 +00:00
vm.h Extend the device pager to support different memory attributes on different 2009-08-28 14:06:55 +00:00
vnode_pager.c Change the type of uio_resid member of struct uio from int to ssize_t. 2009-06-25 18:46:30 +00:00
vnode_pager.h Do not sleep for vnode lock while holding map lock in vm_fault. Try to 2009-02-08 20:23:46 +00:00