Re: [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-16 Thread Petr Mladek
On Mon 2015-06-15 21:14:29, Oleg Nesterov wrote: > Ah, understand. You think that we need to take ->siglock in advance > to avoid the race with SIGCONT? exactly > No, we don't. Let me show you the code I suggested again: > > void kthread_do_signal_stop(void) > { > spin_

Re: [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-15 Thread Oleg Nesterov
Hi Petr, On 06/15, Petr Mladek wrote: > > I am sorry for the late reply. I wanted to think more before answering > all the mails. Don't worry I am always late ;) > On Mon 2015-06-08 23:13:36, Oleg Nesterov wrote: > > > > > > Hmm, the helper would have a strange semantic. You need to take > > > s

Re: [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-15 Thread Petr Mladek
Hi Oleg, I am sorry for the late reply. I wanted to think more before answering all the mails. On Mon 2015-06-08 23:13:36, Oleg Nesterov wrote: > I do not. Contrary, I think this needs more code in the likely case. > Anyway, this API won't have too many users, so I don't even this this > is that

Re: [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-09 Thread Tejun Heo
Hello, Jiri. On Tue, Jun 09, 2015 at 02:15:24PM +0200, Jiri Kosina wrote: > To me, the ultimate goal (*) is to make it possible for kthread to be able > to decide whether it wants "some kind of default behavior" (however that'd > be defined), or "ignore all", or "just handle this set of signals

Re: [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-09 Thread Jiri Kosina
On Tue, 9 Jun 2015, Tejun Heo wrote: > While I agree that it'd be great to consolidate the existing kthread > signal users, I feel quite uncomfortable with doing full-fledged > signal handling for kthreads which try to mimic the userland behavior. > Most of the default behaviors don't make sense f

Re: [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-09 Thread Tejun Heo
Hello, Petr. On Fri, Jun 05, 2015 at 05:01:05PM +0200, Petr Mladek wrote: > Several kthreads already handle signals some way. They do so > in different ways, search for allow_signal(). > > This patch allows to handle the signals in a more uniform way using > kthread_do_signal(). > > The main que

Re: [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-08 Thread Oleg Nesterov
Let me first repeat that I agree that everything is subjective ;) On 06/08, Petr Mladek wrote: > > To be honest, this patch set does _not_ make any big change. But to me it does because (again, imo) it adds the a) unnecessary and b) wrong interface. But yes, yes, I agree that most (all?) of kthr

Re: [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-08 Thread Petr Mladek
On Sat 2015-06-06 23:58:16, Oleg Nesterov wrote: > On 06/05, Petr Mladek wrote: > > > > The main question is how much it should follow POSIX and the signal > > handling of user space processes. On one hand, we want to be as close > > as possible. > > Why? Let the kthread decide what it should if i

Re: [RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-06 Thread Oleg Nesterov
On 06/05, Petr Mladek wrote: > > The main question is how much it should follow POSIX and the signal > handling of user space processes. On one hand, we want to be as close > as possible. Why? Let the kthread decide what it should if it gets, say, SIGSTOP. > Finally, kthread_do_signal() is called

[RFC PATCH 06/18] signal/kthread: Initial implementation of kthread signal handling

2015-06-05 Thread Petr Mladek
Several kthreads already handle signals some way. They do so in different ways, search for allow_signal(). This patch allows to handle the signals in a more uniform way using kthread_do_signal(). The main question is how much it should follow POSIX and the signal handling of user space processes.