On 10/13/20 5:42 PM, Thomas Gleixner wrote: > On Thu, Oct 08 2020 at 09:27, Jens Axboe wrote: >> This adds TIF_NOTIFY_SIGNAL handling in the generic code, which if set, >> will return true if signal_pending() is used in a wait loop. That causes >> an exit of the loop so that notify_signal tracehooks can be run. If the >> wait loop is currently inside a system call, the system call is restarted >> once task_work has been processed. >> >> x86 is using the generic entry code, add the necessary TIF_NOTIFY_SIGNAL >> definitions for it. > > Can you please split that into core changes and a patch which adds > support for x86? Sure, I'll split it into generic and then x86 after that. >> static inline int signal_pending(struct task_struct *p) >> { >> +#ifdef TIF_NOTIFY_SIGNAL > > As I said in the other thread, plase make this > > #if defined(CONFIG_GENERIC_ENTRY) && defined(TIF_NOTIFY_SIGNAL) Thanks, I'll make those tweaks. > Other than that, this approach of using arch_do_signal() addresses my > earlier concerns about the syscall restart machinery. Great! Thanks for taking a look. -- Jens Axboe