All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Matt Fleming <matt@console-pimps.org>,
	Tejun Heo <htejun@gmail.com>,
	linux-kernel@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [RFC][PATCH 0/5] Signal scalability series
Date: Mon, 03 Oct 2011 17:22:00 +0200	[thread overview]
Message-ID: <1317655320.20367.25.camel@twins> (raw)
In-Reply-To: <20111003130701.GB25952@redhat.com>

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)... :-)

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

I'll leave you to be the judge of that, I haven't bent by brain around
all this signal stuff 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.

Bit hard that, posix timers need to deliver signals which pretty much
mandates we do something from irq context (and the round-trip through
softirq context really isn't pretty nor good for performance).

> > 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
> 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).

Although given that we've promoted this idea for a while now and it
hasn't happened yet I'm sure its non-trivial :-)

> > 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.

It doesn't need all 5 locks to send a signal, does it? But then, I'm
somewhat out of my depth here, the whole signal delivery path always
looses me.

> > 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.
> 
> True.
> 
> Mostly this is because we moved misc stuff from tasklist to siglock,
> previously this was a win. Today this doesn't look good.

Well a per-process lock still wins from a global lock, but yeah, it
wants to be broken up further.


  reply	other threads:[~2011-10-03 15:23 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30 15:12 [RFC][PATCH 0/5] Signal scalability series Matt Fleming
2011-09-30 15:12 ` [RFC][PATCH 1/5] signal: Document signal locking rules Matt Fleming
2011-09-30 15:12 ` [RFC][PATCH 2/5] signal: Add rwlock to protect sighand->action Matt Fleming
2011-09-30 15:25   ` Peter Zijlstra
2011-09-30 15:56   ` Matt Fleming
2011-09-30 15:12 ` [RFC][PATCH 3/5] signal: Reduce sighand->siglock hold time in get_signal_to_deliver() Matt Fleming
2011-09-30 15:12 ` [RFC][PATCH 4/5] signal: Add signal->ctrl_lock for job control Matt Fleming
2011-09-30 15:30   ` Peter Zijlstra
2011-09-30 15:36     ` Matt Fleming
2011-09-30 15:12 ` [RFC][PATCH 5/5] signal: Split siglock into shared_siglock and per-thread siglock Matt Fleming
2011-09-30 16:52 ` [RFC][PATCH 0/5] Signal scalability series Oleg Nesterov
2011-09-30 18:54   ` Oleg Nesterov
2011-09-30 20:00   ` Matt Fleming
2011-09-30 23:56     ` Tejun Heo
2011-10-01 10:16       ` Matt Fleming
2011-10-01 13:03         ` Peter Zijlstra
2011-10-03  1:38           ` Tejun Heo
2011-10-03 13:56             ` Thomas Gleixner
2011-10-04  7:37               ` Tejun Heo
2011-10-03 13:07           ` Oleg Nesterov
2011-10-03 15:22             ` Peter Zijlstra [this message]
2011-10-04 17:14               ` Oleg Nesterov
2011-10-04 17:52                 ` Oleg Nesterov
2011-10-04 17:54                 ` Linus Torvalds
2011-10-04 18:13                   ` Oleg Nesterov
2011-10-03 13:16     ` Oleg Nesterov
2011-10-04  8:56       ` Matt Fleming
2011-10-04 17:29         ` Oleg Nesterov
2011-09-30 22:30 ` Andi Kleen
2011-10-01  9:35   ` Matt Fleming
2011-10-03 15:28     ` Linus Torvalds
2011-10-03 15:43       ` Matt Fleming
2011-10-03 16:35         ` Oleg Nesterov
2011-10-03 20:58           ` Matt Fleming
2011-10-03 21:45             ` Linus Torvalds
2011-10-03 22:13             ` Thomas Gleixner
2011-10-04  8:20               ` Matt Fleming
2011-10-04 17:39               ` Oleg Nesterov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317655320.20367.25.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@console-pimps.org \
    --cc=oleg@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.