linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Matt Fleming <matt@console-pimps.org>
Cc: Tejun Heo <tj@kernel.org>,
	linux-kernel@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
	Matt Fleming <matt.fleming@intel.com>
Subject: Re: [RFC][PATCH 0/5] Signal scalability series
Date: Fri, 30 Sep 2011 20:54:54 +0200	[thread overview]
Message-ID: <20110930185454.GA2479@redhat.com> (raw)
In-Reply-To: <20110930165206.GA22048@redhat.com>

On 09/30, Oleg Nesterov wrote:
>
> On 09/30, Matt Fleming wrote:
> >
> > However, it's a good first step and
> > hopefully by keeping it relatively simple it'll make it easier to
> > review.
>
> Cough. I'll try to read this series next week, but currently I feel
> I will never able to understand this code. It surely compliacates
> things a lot.
>
> But. All I can do is to _try_ to check this series from the correctness
> pov. I can't believe (at least at first glance) this worth the trouble,
> but otoh I won't argue unless I'll find the bugs.
>
> >  arch/ia64/kernel/signal.c           |    4 +-
> >  drivers/block/nbd.c                 |    2 +-
> >  drivers/usb/gadget/f_mass_storage.c |    2 +-
> >  drivers/usb/gadget/file_storage.c   |    2 +-
> >  fs/autofs4/waitq.c                  |    5 +-
> >  fs/exec.c                           |   17 +-
> >  fs/jffs2/background.c               |    2 +-
> >  fs/ncpfs/sock.c                     |    2 +
> >  fs/proc/array.c                     |    2 +
> >  fs/signalfd.c                       |   11 +-
> >  include/linux/init_task.h           |    4 +
> >  include/linux/sched.h               |   23 +-
> >  kernel/exit.c                       |   29 +-
> >  kernel/fork.c                       |    4 +
> >  kernel/freezer.c                    |   10 +-
> >  kernel/kmod.c                       |    8 +-
> >  kernel/posix-timers.c               |    5 +-
> >  kernel/ptrace.c                     |   68 ++--
> >  kernel/signal.c                     |  737 +++++++++++++++++++++++++++--------
> >  net/9p/client.c                     |    6 +-
> >  net/sunrpc/svc.c                    |    3 -
> >  security/selinux/hooks.c            |   11 +-
> >  22 files changed, 677 insertions(+), 280 deletions(-)
>
> And, this patch adds 4 new locks:
>
> 	sighand_struct->action_lock
>
> 	signal_struct->ctrl_lock
> 	signal_struct->shared_siglock
>
> 	task_struct->siglock
>
> Nice ;) For what? This should be justified, imho.

Yes. I did the quick and dirty check (under kvm),

Before this series:

	[tst@myhost ~]$ time perl -wle '$SIG{HUP}=sub{}; kill HUP, $$ for 1..100_000'

	real    0m2.451s
	user    0m0.350s
	sys     0m2.097s
	[tst@myhost ~]$ time perl -wle '$SIG{HUP}=sub{}; kill HUP, $$ for 1..100_000'

	real    0m2.475s
	user    0m0.357s
	sys     0m2.117s
	[tst@myhost ~]$ time perl -wle '$SIG{HUP}=sub{}; kill HUP, $$ for 1..100_000'

	real    0m2.443s
	user    0m0.330s
	sys     0m2.113s

After:

	tst@myhost ~]$ time perl -wle '$SIG{HUP}=sub{}; kill HUP, $$ for 1..100_000'

	real    0m3.194s
	user    0m0.283s
	sys     0m2.910s
	[tst@myhost ~]$ time perl -wle '$SIG{HUP}=sub{}; kill HUP, $$ for 1..100_000'

	real    0m3.212s
	user    0m0.357s
	sys     0m2.853s
	[tst@myhost ~]$ time perl -wle '$SIG{HUP}=sub{}; kill HUP, $$ for 1..100_000'

	real    0m3.196s
	user    0m0.350s
	sys     0m2.846s

Doesn't like very good (may be only under kvm?). In fact I am really
surprised, I didn't expect the difference will be that noticeable.

Yes, yes, I understand that your goal is scalability, but still.

Oleg.


  reply	other threads:[~2011-09-30 18:58 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 [this message]
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
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=20110930185454.GA2479@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=matt@console-pimps.org \
    --cc=tj@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).