]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make kstack_pages a tunable on arm, x86, and powepc. On i386, the
authorkib <kib@FreeBSD.org>
Mon, 10 Aug 2015 17:18:21 +0000 (17:18 +0000)
committerkib <kib@FreeBSD.org>
Mon, 10 Aug 2015 17:18:21 +0000 (17:18 +0000)
commit9033c894a1c694d3e946571d9e57c05349a235eb
tree6c5e3b30f16040565000131df5f7348a27c34a56
parent141883cce0cea307fd0365430906181b1954df86
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
25 files changed:
sys/amd64/amd64/genassym.c
sys/amd64/amd64/machdep.c
sys/amd64/amd64/mp_machdep.c
sys/arm/arm/machdep.c
sys/arm/at91/at91_machdep.c
sys/arm/cavium/cns11xx/econa_machdep.c
sys/arm/include/param.h
sys/arm/samsung/s3c2xx0/s3c24x0_machdep.c
sys/arm/xscale/i80321/ep80219_machdep.c
sys/arm/xscale/i80321/iq31244_machdep.c
sys/arm/xscale/i8134x/crb_machdep.c
sys/arm/xscale/ixp425/avila_machdep.c
sys/arm/xscale/pxa/pxa_machdep.c
sys/ddb/db_ps.c
sys/i386/i386/genassym.c
sys/i386/i386/mp_machdep.c
sys/i386/i386/sys_machdep.c
sys/kern/kern_fork.c
sys/kern/subr_param.c
sys/powerpc/aim/mmu_oea.c
sys/powerpc/aim/mmu_oea64.c
sys/powerpc/booke/pmap.c
sys/powerpc/include/param.h
sys/vm/vm_glue.c
sys/x86/xen/pv.c