]> git.baikalelectronics.ru Git - kernel.git/commit
signal: Use a smaller struct siginfo in the kernel
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 25 Sep 2018 10:59:31 +0000 (12:59 +0200)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 3 Oct 2018 14:50:39 +0000 (16:50 +0200)
commit27a94074401283c660941ac41f1846599cd7984d
treedc7eeac8b4956f0b2dfc6209e1398896a59896f5
parentb4d35900a9388ff4e6aca32b07edc2760263a327
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>
include/linux/signal.h
include/linux/signal_types.h
kernel/signal.c