lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 4 Oct 2011 19:14:37 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Matt Fleming <matt@...sole-pimps.org>,
	Tejun Heo <htejun@...il.com>, linux-kernel@...r.kernel.org,
	Tony Luck <tony.luck@...el.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC][PATCH 0/5] Signal scalability series

On 10/03, Peter Zijlstra wrote:
>
> On Mon, 2011-10-03 at 15:07 +0200, Oleg Nesterov wrote:
> > On 10/01, Peter Zijlstra wrote:
>
> > But this series can't help afaics. At least in its current state. It
> > only adds more locking to the sending paths.
>
> Right, so I was hoping Matt had a plan (TM)... :-)

Whatever we do with the locking, this can't remove O(nr_threads),
although read_lock() could help to reduce the contention.

> > I think, the best solution would be: never send the signal from irq
> > context, and ->siglock shouldn't disable irqs.
>
> Bit hard that, posix timers need to deliver signals which pretty much
> mandates we do something from irq context

Of course. We should notify a thread even if it blocks the signal.

> (and the round-trip through
> softirq context really isn't pretty nor good for performance).

No, no. I meant, it would be nice to offload the sending to the target.
The process itself should take care.

> > Probably this is possible too. I was thinking anout this when
> > set_current_blocked() was added. Unfortunately this needs a lot of
> > complications.
>
> Right, so the thing Thomas and I have been promoting for a while now is
> to update a signal target vector on every signal mask update. Mask
> updates should be the slow path. This would leave us with a ready target
> in O(1).

Yes. This is the "obvious" solution ;) Now that we have
set_current_blocked() this is simple. Except, of course, this blows
signal_struct and set_current_blocked() can't rely on TIF_SIGPENDING.
But we can probably add TIF_YOU_ARE_LISTED_IN_CURR_TARGET_ARRAY.

And in fact this was _one_ of the reasons for set_current_blocked().

> > 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.
>
> It doesn't need all 5 locks to send a signal, does it?

Depending on group/private 3 or 4. Plus ->ctrl_lock if the signal
is fatal but I don't really understand this part... Fortunately I
think this is not needed ;)

And mostly (afaics) this tries to help to dequeue the signal, not
to send. At least currently.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ