summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-08-29 13:28:02 +0000
committerkib <kib@FreeBSD.org>2009-08-29 13:28:02 +0000
commit9e8ade6852ffba4a3acbce8ed04b15b86e41c732 (patch)
tree82b12109af3318558a1e8c250b9fe6dbbb1bb53d /sys/arm
parent13a2f00901be2c2864e1b4b96d70fecffd1d5c4c (diff)
downloadFreeBSD-src-9e8ade6852ffba4a3acbce8ed04b15b86e41c732.zip
FreeBSD-src-9e8ade6852ffba4a3acbce8ed04b15b86e41c732.tar.gz
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
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/arm/vm_machdep.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c
index 1a907cc..6bd5799 100644
--- a/sys/arm/arm/vm_machdep.c
+++ b/sys/arm/arm/vm_machdep.c
@@ -119,9 +119,6 @@ cpu_fork(register struct thread *td1, register struct proc *p2,
#ifdef __XSCALE__
#ifndef CPU_XSCALE_CORE3
pmap_use_minicache(td2->td_kstack, td2->td_kstack_pages * PAGE_SIZE);
- if (td2->td_altkstack)
- pmap_use_minicache(td2->td_altkstack, td2->td_altkstack_pages *
- PAGE_SIZE);
#endif
#endif
td2->td_pcb = pcb2;
OpenPOWER on IntegriCloud