]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd64: stop using top of the thread' kernel stack for FPU user save area
authorKonstantin Belousov <kib@FreeBSD.org>
Mon, 13 Sep 2021 21:05:47 +0000 (00:05 +0300)
committerKonstantin Belousov <kib@FreeBSD.org>
Tue, 21 Sep 2021 17:20:15 +0000 (20:20 +0300)
commitdf8dd6025af88a99d34f549fa9591a9b8f9b75b1
treeb635520cbc5b72d1e33e072b02ec87d99aac2729
parent0f6829488ef32142b9ea1c0806fb5ecfe0872c02
amd64: stop using top of the thread' kernel stack for FPU user save area

Instead do one more allocation at the thread creation time.  This frees
a lot of space on the stack.

Also do not use alloca() for temporal storage in signal delivery sendsig()
function and signal return syscall sys_sigreturn().  This saves equal
amount of space, again by the cost of one more allocation at the thread
creation time.

A useful experiment now would be to reduce KSTACK_PAGES.

Reviewed by: jhb, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31954
sys/amd64/amd64/exec_machdep.c
sys/amd64/amd64/fpu.c
sys/amd64/amd64/machdep.c
sys/amd64/amd64/vm_machdep.c
sys/amd64/ia32/ia32_signal.c
sys/amd64/include/proc.h
sys/kern/kern_thread.c