Messages in this thread Patch in this message |  | | | Subject | [Patch 3/6] per task delay accounting taskstats interface: fix early sem init | | From | Shailabh Nagar <> | | Date | Tue, 11 Jul 2006 00:30:55 -0400 |
| |
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:
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |