summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-08-10 17:18:21 +0000
committerkib <kib@FreeBSD.org>2015-08-10 17:18:21 +0000
commit9033c894a1c694d3e946571d9e57c05349a235eb (patch)
tree6c5e3b30f16040565000131df5f7348a27c34a56 /sys/ddb
parent141883cce0cea307fd0365430906181b1954df86 (diff)
downloadFreeBSD-src-9033c894a1c694d3e946571d9e57c05349a235eb.zip
FreeBSD-src-9033c894a1c694d3e946571d9e57c05349a235eb.tar.gz
Make kstack_pages a tunable on arm, x86, and powepc. On i386, the
initial thread stack is not adjusted by the tunable, the stack is allocated too early to get access to the kernel environment. See TD0_KSTACK_PAGES for the thread0 stack sizing on i386. The tunable was tested on x86 only. From the visual inspection, it seems that it might work on arm and powerpc. The arm USPACE_SVC_STACK_TOP and powerpc USPACE macros seems to be already incorrect for the threads with non-default kstack size. I only changed the macros to use variable instead of constant, since I cannot test. On arm64, mips and sparc64, some static data structures are sized by KSTACK_PAGES, so the tunable is disabled. Sponsored by: The FreeBSD Foundation MFC after: 2 week
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c
index 553c22e..f38c89f 100644
--- a/sys/ddb/db_ps.c
+++ b/sys/ddb/db_ps.c
@@ -462,7 +462,7 @@ db_findstack_cmd(db_expr_t addr, bool have_addr, db_expr_t dummy3 __unused,
for (ks_ce = kstack_cache; ks_ce != NULL;
ks_ce = ks_ce->next_ks_entry) {
if ((vm_offset_t)ks_ce <= saddr && saddr < (vm_offset_t)ks_ce +
- PAGE_SIZE * KSTACK_PAGES) {
+ PAGE_SIZE * kstack_pages) {
db_printf("Cached stack %p\n", ks_ce);
return;
}
OpenPOWER on IntegriCloud