Re: [RFC][PATCH 0/5] Signal scalability series

From: Oleg Nesterov
Date: Mon Oct 03 2011 - 10:10:58 EST

On 10/01, Peter Zijlstra wrote:
> On Sat, 2011-10-01 at 11:16 +0100, Matt Fleming wrote:
> > I also think Thomas/Peter mentioned something about latency in
> > delivering timer signals because of contention on the per-process
> > siglock. They might have some more details on that.
> Right, so signal delivery is O(nr_threads),

Yes, a !SIGEV_THREAD_ID timer needs to find a thread which doesn't
block the signal.

But this series can't help afaics. At least in its current state. It
only adds more locking to the sending paths.

And anyway it is wrong (afaics, and I didn't read it yet ;).

> which precludes being able
> to deliver signals from hardirq context, leading to lots of ugly in -rt.

I think, the best solution would be: never send the signal from irq
context, and ->siglock shouldn't disable irqs.

> The hope is that this work is a stepping stone to O(1) signal delivery.

Probably this is possible too. I was thinking anout this when
set_current_blocked() was added. Unfortunately this needs a lot of

> Breaking up the multitude of uses of siglock certainly seems worthwhile
> esp.

Agreed. But I am not sure how much we should split the locking when
it comes to sending/dequeueing/etc signals. 5 locks seems too much.

> And yes, aside from that the siglock can be quite contended because its
> pretty much the one lock serializing all of the process wide state.


Mostly this is because we moved misc stuff from tasklist to siglock,
previously this was a win. Today this doesn't look good.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at