[PATCHSET v6] Add support for TIF_NOTIFY_SIGNAL

Jens Axboe
2020-10-16T15:45:53Z

Hi,

The goal is this patch series is to decouple TWA_SIGNAL based task_work
from real signals and signal delivery. The motivation is speeding up
TWA_SIGNAL based task_work, particularly for threaded setups where
->sighand is shared across threads. See the last patch for numbers.

Cleanups in this series, see changelog. But the arch and cleanup
series that goes after this series is much simpler now that we handle
TIF_NOTIFY_SIGNAL generically for !CONFIG_GENERIC_ENTRY.

Changes since v5:
- Don't make TIF_NOTIFY_SIGNAL dependent on CONFIG_GENERIC_ENTRY
- Handle TIF_NOTIFY_SIGNAL in get_signal() for !CONFIG_GENERIC_ENTRY
- Add handle_signal_work(), and change arch_do_signal() to
arch_do_signal_or_restart() and pass in a 'has_signal' bool for that
- Dropped TIF_NOTIFY_RESUME patch from this series, sent out
separately.

arch/x86/include/asm/thread_info.h | 2 ++
arch/x86/kernel/signal.c | 4 +--
include/linux/entry-common.h | 11 +++++---
include/linux/entry-kvm.h | 4 +--
include/linux/sched/signal.h | 20 ++++++++++++---
include/linux/tracehook.h | 27 ++++++++++++++++++++
kernel/entry/common.c | 14 +++++++---
kernel/entry/kvm.c | 3 +++
kernel/events/uprobes.c | 2 +-
kernel/signal.c | 22 +++++++++++++---
kernel/task_work.c | 41 +++++++++++++++++++++---------
11 files changed, 120 insertions(+), 30 deletions(-)

--
Jens Axboe