diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcutree.c | 20 | ||||
-rw-r--r-- | kernel/rcutree.h | 1 |
2 files changed, 12 insertions, 9 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index ec6196fcd1fa..f391886be8f0 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -54,8 +54,8 @@ | |||
54 | 54 | ||
55 | static struct lock_class_key rcu_node_class[NUM_RCU_LVLS]; | 55 | static struct lock_class_key rcu_node_class[NUM_RCU_LVLS]; |
56 | 56 | ||
57 | #define RCU_STATE_INITIALIZER(name) { \ | 57 | #define RCU_STATE_INITIALIZER(structname) { \ |
58 | .level = { &name.node[0] }, \ | 58 | .level = { &structname.node[0] }, \ |
59 | .levelcnt = { \ | 59 | .levelcnt = { \ |
60 | NUM_RCU_LVL_0, /* root of hierarchy. */ \ | 60 | NUM_RCU_LVL_0, /* root of hierarchy. */ \ |
61 | NUM_RCU_LVL_1, \ | 61 | NUM_RCU_LVL_1, \ |
@@ -66,13 +66,14 @@ static struct lock_class_key rcu_node_class[NUM_RCU_LVLS]; | |||
66 | .signaled = RCU_GP_IDLE, \ | 66 | .signaled = RCU_GP_IDLE, \ |
67 | .gpnum = -300, \ | 67 | .gpnum = -300, \ |
68 | .completed = -300, \ | 68 | .completed = -300, \ |
69 | .onofflock = __RAW_SPIN_LOCK_UNLOCKED(&name.onofflock), \ | 69 | .onofflock = __RAW_SPIN_LOCK_UNLOCKED(&structname.onofflock), \ |
70 | .orphan_cbs_list = NULL, \ | 70 | .orphan_cbs_list = NULL, \ |
71 | .orphan_cbs_tail = &name.orphan_cbs_list, \ | 71 | .orphan_cbs_tail = &structname.orphan_cbs_list, \ |
72 | .orphan_qlen = 0, \ | 72 | .orphan_qlen = 0, \ |
73 | .fqslock = __RAW_SPIN_LOCK_UNLOCKED(&name.fqslock), \ | 73 | .fqslock = __RAW_SPIN_LOCK_UNLOCKED(&structname.fqslock), \ |
74 | .n_force_qs = 0, \ | 74 | .n_force_qs = 0, \ |
75 | .n_force_qs_ngp = 0, \ | 75 | .n_force_qs_ngp = 0, \ |
76 | .name = #structname, \ | ||
76 | } | 77 | } |
77 | 78 | ||
78 | struct rcu_state rcu_sched_state = RCU_STATE_INITIALIZER(rcu_sched_state); | 79 | struct rcu_state rcu_sched_state = RCU_STATE_INITIALIZER(rcu_sched_state); |
@@ -483,7 +484,8 @@ static void print_other_cpu_stall(struct rcu_state *rsp) | |||
483 | 484 | ||
484 | /* OK, time to rat on our buddy... */ | 485 | /* OK, time to rat on our buddy... */ |
485 | 486 | ||
486 | printk(KERN_ERR "INFO: RCU detected CPU stalls:"); | 487 | printk(KERN_ERR "INFO: %s detected stalls on CPUs/tasks: {", |
488 | rsp->name); | ||
487 | rcu_for_each_leaf_node(rsp, rnp) { | 489 | rcu_for_each_leaf_node(rsp, rnp) { |
488 | raw_spin_lock_irqsave(&rnp->lock, flags); | 490 | raw_spin_lock_irqsave(&rnp->lock, flags); |
489 | rcu_print_task_stall(rnp); | 491 | rcu_print_task_stall(rnp); |
@@ -494,7 +496,7 @@ static void print_other_cpu_stall(struct rcu_state *rsp) | |||
494 | if (rnp->qsmask & (1UL << cpu)) | 496 | if (rnp->qsmask & (1UL << cpu)) |
495 | printk(" %d", rnp->grplo + cpu); | 497 | printk(" %d", rnp->grplo + cpu); |
496 | } | 498 | } |
497 | printk(" (detected by %d, t=%ld jiffies)\n", | 499 | printk("} (detected by %d, t=%ld jiffies)\n", |
498 | smp_processor_id(), (long)(jiffies - rsp->gp_start)); | 500 | smp_processor_id(), (long)(jiffies - rsp->gp_start)); |
499 | trigger_all_cpu_backtrace(); | 501 | trigger_all_cpu_backtrace(); |
500 | 502 | ||
@@ -510,8 +512,8 @@ static void print_cpu_stall(struct rcu_state *rsp) | |||
510 | unsigned long flags; | 512 | unsigned long flags; |
511 | struct rcu_node *rnp = rcu_get_root(rsp); | 513 | struct rcu_node *rnp = rcu_get_root(rsp); |
512 | 514 | ||
513 | printk(KERN_ERR "INFO: RCU detected CPU %d stall (t=%lu jiffies)\n", | 515 | printk(KERN_ERR "INFO: %s detected stall on CPU %d (t=%lu jiffies)\n", |
514 | smp_processor_id(), jiffies - rsp->gp_start); | 516 | rsp->name, smp_processor_id(), jiffies - rsp->gp_start); |
515 | trigger_all_cpu_backtrace(); | 517 | trigger_all_cpu_backtrace(); |
516 | 518 | ||
517 | raw_spin_lock_irqsave(&rnp->lock, flags); | 519 | raw_spin_lock_irqsave(&rnp->lock, flags); |
diff --git a/kernel/rcutree.h b/kernel/rcutree.h index 4a525a30e08e..11f171121ad9 100644 --- a/kernel/rcutree.h +++ b/kernel/rcutree.h | |||
@@ -326,6 +326,7 @@ struct rcu_state { | |||
326 | unsigned long jiffies_stall; /* Time at which to check */ | 326 | unsigned long jiffies_stall; /* Time at which to check */ |
327 | /* for CPU stalls. */ | 327 | /* for CPU stalls. */ |
328 | #endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ | 328 | #endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ |
329 | char *name; /* Name of structure. */ | ||
329 | }; | 330 | }; |
330 | 331 | ||
331 | /* Return values for rcu_preempt_offline_tasks(). */ | 332 | /* Return values for rcu_preempt_offline_tasks(). */ |