Messages in this thread | | | Date | Thu, 14 Apr 2011 21:20:59 +0200 | From | Oleg Nesterov <> | Subject | Re: [RFC][PATCH 5/5] signals: Don't hold shared siglock across signal delivery |
| |
On 04/14, Matt Fleming wrote: > > On Wed, 13 Apr 2011 22:12:19 +0200 > Oleg Nesterov <oleg@redhat.com> wrote: > > > This adds new races. And this time I do not even understand the intent. > > I mean, it is not clear to me why this change can really help to speed > > up get_signal_to_deliver(). > > Again, it's not necessarily speeding up get_signal_to_deliver(), but > rather it's reducing the contention on the shared siglock.
Yes, sorry for confusion. I used the "speed up" term wrongly throughout. I understand what are you trying to do.
But yes, in this case I probably missed the intent,
> For example, without this patch, if you've got someone sending a signal > to a task group, you can't run get_signal_to_deliver() in parallel
I missed the simple fact, get_signal_to_deliver() could avoid ->siglock completely if it dequeues the private signal.
Btw, I forgot to mention another problem. We should not dequeue from signal->shared_pending before task->pending. There are various reasons why we shouldn't, but in particular please look at a27341cd "Prioritize synchronous signals over 'normal' signals".
Oleg.
| |