module: make locking more fine-grained.
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 5 Jun 2010 17:17:36 +0000 (11:17 -0600)
committerRusty Russell <rusty@rustcorp.com.au>
Sat, 5 Jun 2010 01:47:36 +0000 (11:17 +0930)
commit75676500f8298f0ee89db12db97294883c4b768e
treefbd74f1b6bfd258fac980c6cc3d4fa9eafa47d51
parent6407ebb271fc34440b306f305e1efb7685eece26
module: make locking more fine-grained.

Kay Sievers <kay.sievers@vrfy.org> reports that we still have some
contention over module loading which is slowing boot.

Linus also disliked a previous "drop lock and regrab" patch to fix the
bne2 "gave up waiting for init of module libcrc32c" message.

This is more ambitious: we only grab the lock where we need it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Brandon Philips <brandon@ifup.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
kernel/module.c