aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/signal_types.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-09-25 12:59:31 +0200
committerEric W. Biederman <ebiederm@xmission.com>2018-10-03 16:50:39 +0200
commit4ce5f9c9e7546915c559ffae594e6d73f918db00 (patch)
treedc7eeac8b4956f0b2dfc6209e1398896a59896f5 /include/linux/signal_types.h
parentsignal: Distinguish between kernel_siginfo and siginfo (diff)
downloadlinux-dev-4ce5f9c9e7546915c559ffae594e6d73f918db00.tar.xz
linux-dev-4ce5f9c9e7546915c559ffae594e6d73f918db00.zip
signal: Use a smaller struct siginfo in the kernel
We reserve 128 bytes for struct siginfo but only use about 48 bytes on 64bit and 32 bytes on 32bit. Someday we might use more but it is unlikely to be anytime soon. Userspace seems content with just enough bytes of siginfo to implement sigqueue. Or in the case of checkpoint/restart reinjecting signals the kernel has sent. Reducing the stack footprint and the work to copy siginfo around from 2 cachelines to 1 cachelines seems worth doing even if I don't have benchmarks to show a performance difference. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/signal_types.h')
-rw-r--r--include/linux/signal_types.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/signal_types.h b/include/linux/signal_types.h
index 2a40a9c5e4ad..f8a90ae9c6ec 100644
--- a/include/linux/signal_types.h
+++ b/include/linux/signal_types.h
@@ -10,10 +10,7 @@
#include <uapi/linux/signal.h>
typedef struct kernel_siginfo {
- union {
- __SIGINFO;
- int _si_pad[SI_MAX_SIZE/sizeof(int)];
- };
+ __SIGINFO;
} kernel_siginfo_t;
/*