summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/entry.h
diff options
context:
space:
mode:
authorMartin Schwidefsky2017-09-12 16:37:33 +0200
committerMartin Schwidefsky2018-10-09 11:20:57 +0200
commitce3dc447493ff4186b192b38d723ab5e8c1eb52f (patch)
treef93f58afcd85087876a1ab9badcdaed76b5a37fe /arch/s390/kernel/entry.h
parents390: add stack switch helper (diff)
downloadkernel-qcow2-linux-ce3dc447493ff4186b192b38d723ab5e8c1eb52f.tar.gz
kernel-qcow2-linux-ce3dc447493ff4186b192b38d723ab5e8c1eb52f.tar.xz
kernel-qcow2-linux-ce3dc447493ff4186b192b38d723ab5e8c1eb52f.zip
s390: add support for virtually mapped kernel stacks
With virtually mapped kernel stacks the kernel stack overflow detection is now fault based, every stack has a guard page in the vmalloc space. The panic_stack is renamed to nodat_stack and is used for all function that need to run without DAT, e.g. memcpy_real or do_start_kdump. The main effect is a reduction in the kernel image size as with vmap stacks the old style overflow checking that adds two instructions per function is not needed anymore. Result from bloat-o-meter: add/remove: 20/1 grow/shrink: 13/26854 up/down: 2198/-216240 (-214042) In regard to performance the micro-benchmark for fork has a hit of a few microseconds, allocating 4 pages in vmalloc space is more expensive compare to an order-2 page allocation. But with real workload I could not find a noticeable difference. Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/entry.h')
-rw-r--r--arch/s390/kernel/entry.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h
index 472fa2f1a4a5..c3816ae108b0 100644
--- a/arch/s390/kernel/entry.h
+++ b/arch/s390/kernel/entry.h
@@ -86,4 +86,7 @@ DECLARE_PER_CPU(u64, mt_cycles[8]);
void gs_load_bc_cb(struct pt_regs *regs);
void set_fs_fixup(void);
+unsigned long stack_alloc(void);
+void stack_free(unsigned long stack);
+
#endif /* _ENTRY_H */