Re: [PATCH 3/4] kernel: add support for TIF_NOTIFY_SIGNAL

2020-10-14 Thread Jens Axboe
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 tracehook

Re: [PATCH 3/4] kernel: add support for TIF_NOTIFY_SIGNAL

2020-10-14 Thread Jens Axboe
On 10/13/20 5:45 PM, Thomas Gleixner wrote: > On Fri, Oct 09 2020 at 09:13, Jens Axboe wrote: >>> Hmm. I just noticed that only x86 uses arch_do_signal(), so perhaps you can >>> add this change to this patch right now? Up to you. >> >> Sure, we can do that. Incremental on top then looks like the be

Re: [PATCH 3/4] kernel: add support for TIF_NOTIFY_SIGNAL

2020-10-14 Thread Thomas Gleixner
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 ins

Re: [PATCH 3/4] kernel: add support for TIF_NOTIFY_SIGNAL

2020-10-13 Thread Thomas Gleixner
On Fri, Oct 09 2020 at 09:13, Jens Axboe wrote: >> Hmm. I just noticed that only x86 uses arch_do_signal(), so perhaps you can >> add this change to this patch right now? Up to you. > > Sure, we can do that. Incremental on top then looks like the below. I don't > feel that strongly about it, but it

Re: [PATCH 3/4] kernel: add support for TIF_NOTIFY_SIGNAL

2020-10-09 Thread Jens Axboe
On 10/9/20 8:43 AM, Oleg Nesterov wrote: > Once again, I am fine with this patch, just a minor comment... > > On 10/08, Jens Axboe wrote: >> >> --- a/arch/x86/kernel/signal.c >> +++ b/arch/x86/kernel/signal.c >> @@ -808,7 +808,10 @@ void arch_do_signal(struct pt_regs *regs) >> { >> struct ks

Re: [PATCH 3/4] kernel: add support for TIF_NOTIFY_SIGNAL

2020-10-09 Thread Oleg Nesterov
Once again, I am fine with this patch, just a minor comment... On 10/08, Jens Axboe wrote: > > --- a/arch/x86/kernel/signal.c > +++ b/arch/x86/kernel/signal.c > @@ -808,7 +808,10 @@ void arch_do_signal(struct pt_regs *regs) > { > struct ksignal ksig; > > - if (get_signal(&ksig)) { > +

[PATCH 3/4] kernel: add support for TIF_NOTIFY_SIGNAL

2020-10-08 Thread Jens Axboe
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 tas