From: Shailabh Nagar <nagar@watson.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Jay Lan <jlan@sgi.com>, Chris Sturtivant <csturtiv@sgi.com>,
Paul Jackson <pj@sgi.com>, Balbir Singh <balbir@in.ibm.com>,
Chandra Seetharaman <sekharan@us.ibm.com>
Subject: [Patch 3/6] per task delay accounting taskstats interface: fix early sem init
Date: Tue, 11 Jul 2006 00:30:55 -0400 [thread overview]
Message-ID: <1152592255.14142.125.camel@localhost.localdomain> (raw)
In-Reply-To: <1152591838.14142.114.camel@localhost.localdomain>
Shift initialization of semaphores taken on exit() path
to earlier in the bootup sequence. Without this fix,
booting on large cpu machines hangs at down_read() called
on one of the per-cpu semaphores declared in taskstats.
Signed-Off-By: Shailabh Nagar <nagar@watson.ibm.com>
kernel/taskstats.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Index: linux-2.6.18-rc1/kernel/taskstats.c
===================================================================
--- linux-2.6.18-rc1.orig/kernel/taskstats.c 2006-07-10 23:44:16.000000000 -0400
+++ linux-2.6.18-rc1/kernel/taskstats.c 2006-07-10 23:44:20.000000000 -0400
@@ -501,15 +501,20 @@ static struct genl_ops taskstats_ops = {
/* Needed early in initialization */
void __init taskstats_init_early(void)
{
+ unsigned int i;
+
taskstats_cache = kmem_cache_create("taskstats_cache",
sizeof(struct taskstats),
0, SLAB_PANIC, NULL, NULL);
+ for_each_possible_cpu(i) {
+ INIT_LIST_HEAD(&(per_cpu(listener_array, i).list));
+ init_rwsem(&(per_cpu(listener_array, i).sem));
+ }
}
static int __init taskstats_init(void)
{
int rc;
- unsigned int i;
rc = genl_register_family(&family);
if (rc)
@@ -519,11 +524,6 @@ static int __init taskstats_init(void)
if (rc < 0)
goto err;
- for_each_possible_cpu(i) {
- INIT_LIST_HEAD(&(per_cpu(listener_array, i).list));
- init_rwsem(&(per_cpu(listener_array, i).sem));
- }
-
family_registered = 1;
return 0;
err:
next prev parent reply other threads:[~2006-07-11 4:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 4:23 [Patch 0/6] delay accounting & taskstats fixes Shailabh Nagar
2006-07-11 4:27 ` [Patch 1/6] per task delay accounting taskstats interface: code cleanup Shailabh Nagar
2006-07-11 4:29 ` [Patch 2/6] per task delay accounting taskstats interface: documentation fix Shailabh Nagar
2006-07-11 4:30 ` Shailabh Nagar [this message]
2006-07-11 4:33 ` [Patch 4/6] per task delay accounting taskstats interface: fix drop listener only on socket close Shailabh Nagar
2006-07-11 4:34 ` [Patch 5/6] list_islast utility Shailabh Nagar
2006-07-11 4:36 ` [Patch 6/6] per task delay accounting taskstats interface: fix clone skbs for each listener Shailabh Nagar
2006-07-11 10:05 ` Andrew Morton
2006-07-11 10:28 ` Herbert Xu
2006-07-11 10:57 ` Andrew Morton
2006-07-11 11:15 ` Herbert Xu
2006-07-11 17:44 ` Shailabh Nagar
2006-07-12 5:41 ` Shailabh Nagar
2006-07-11 4:50 ` [Patch 0/6] delay accounting & taskstats fixes Shailabh Nagar
2006-07-11 11:28 ` Christoph Hellwig
2006-07-11 15:33 ` Shailabh Nagar
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=1152592255.14142.125.camel@localhost.localdomain \
--to=nagar@watson.ibm.com \
--cc=akpm@osdl.org \
--cc=balbir@in.ibm.com \
--cc=csturtiv@sgi.com \
--cc=jlan@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pj@sgi.com \
--cc=sekharan@us.ibm.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
Powered by JetHome