freebsd-nq/sys/arm
Konstantin Belousov c3cf0b476f 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
MFC after:	1 week
2009-08-29 13:28:02 +00:00
..
arm Remove the altkstacks, instead instantiate threads with kernel stack 2009-08-29 13:28:02 +00:00
at91 - Proprely intialize UART parameters at probe stage, so uart(4) 2009-08-15 15:15:20 +00:00
compile
conf revert r196600; didn't notice it'd been done already 2009-08-27 17:55:44 +00:00
include Add support to the virtual memory system for configuring machine- 2009-07-12 23:31:20 +00:00
mv Introduce SheevaPlug support. 2009-08-25 10:09:25 +00:00
sa11x0 Map DPCPU pages into ARM kernel VA space. 2009-07-01 20:07:44 +00:00
xscale No need to remove the same flag multiple times. 2009-08-23 19:54:36 +00:00