This commit adds a failure-return count for smp_call_function_single(), and adds this to the console messages for rcutorture writer stalls and at the end of rcutorture testing.
Unified · Split
| @@ -32,6 +32,7 @@ typedef void (*postgp_func_t)(struct rcu_tasks *rtp); · 31 unmodified lines | |||
| 32 | * @gp_start: Most recent grace-period start in jiffies. | 32 | * @gp_start: Most recent grace-period start in jiffies. |
| 33 | * @n_gps: Number of grace periods completed since boot. | 33 | * @n_gps: Number of grace periods completed since boot. |
| 34 | * @n_ipis: Number of IPIs sent to encourage grace periods to end. | 34 | * @n_ipis: Number of IPIs sent to encourage grace periods to end. |
| 35 | * @n_ipis_fails: Number of IPI-send failures. | ||
| 35 | * @pregp_func: This flavor's pre-grace-period function (optional). | 36 | * @pregp_func: This flavor's pre-grace-period function (optional). |
| 36 | * @pertask_func: This flavor's per-task scan function (optional). | 37 | * @pertask_func: This flavor's per-task scan function (optional). |
| 37 | * @postscan_func: This flavor's post-task scan function (optional). | 38 | * @postscan_func: This flavor's post-task scan function (optional). |
| @@ -51,6 +52,7 @@ struct rcu_tasks { · 13 unmodified lines | |||
| 51 | unsigned long gp_start; | 52 | unsigned long gp_start; |
| 52 | unsigned long n_gps; | 53 | unsigned long n_gps; |
| 53 | unsigned long n_ipis; | 54 | unsigned long n_ipis; |
| 55 | unsigned long n_ipis_fails; | ||
| 54 | struct task_struct *kthread_ptr; | 56 | struct task_struct *kthread_ptr; |
| 55 | rcu_tasks_gp_func_t gp_func; | 57 | rcu_tasks_gp_func_t gp_func; |
| 56 | pregp_func_t pregp_func; | 58 | pregp_func_t pregp_func; |
| @@ -290,12 +292,12 @@ static void __init rcu_tasks_bootup_oddness(void) · 233 unmodified lines | |||
| 290 | /* Dump out rcutorture-relevant state common to all RCU-tasks flavors. */ | 292 | /* Dump out rcutorture-relevant state common to all RCU-tasks flavors. */ |
| 291 | static void show_rcu_tasks_generic_gp_kthread(struct rcu_tasks *rtp, char *s) | 293 | static void show_rcu_tasks_generic_gp_kthread(struct rcu_tasks *rtp, char *s) |
| 292 | { | 294 | { |
| 293 | pr_info("%s: %s(%d) since %lu g:%lu i:%lu %c%c %s\n", | 295 | pr_info("%s: %s(%d) since %lu g:%lu i:%lu/%lu %c%c %s\n", |
| 294 | rtp->kname, | 296 | rtp->kname, |
| 295 | tasks_gp_state_getname(rtp), | 297 | tasks_gp_state_getname(rtp), data_race(rtp->gp_state), |
| 296 | data_race(rtp->gp_state), | ||
| 297 | jiffies - data_race(rtp->gp_jiffies), | 298 | jiffies - data_race(rtp->gp_jiffies), |
| 298 | data_race(rtp->n_gps), data_race(rtp->n_ipis), | 299 | data_race(rtp->n_gps), |
| 300 | data_race(rtp->n_ipis_fails), data_race(rtp->n_ipis), | ||
| 299 | ".k"[!!data_race(rtp->kthread_ptr)], | 301 | ".k"[!!data_race(rtp->kthread_ptr)], |
| 300 | ".C"[!!data_race(rtp->cbs_head)], | 302 | ".C"[!!data_race(rtp->cbs_head)], |
| 301 | s); | 303 | s); |
| @@ -909,6 +911,7 @@ static void trc_wait_for_one_reader(struct task_struct *t, · 607 unmodified lines | |||
| 909 | trc_read_check_handler, t, 0)) { | 911 | trc_read_check_handler, t, 0)) { |
| 910 | // Just in case there is some other reason for | 912 | // Just in case there is some other reason for |
| 911 | // failure than the target CPU being offline. | 913 | // failure than the target CPU being offline. |
| 914 | rcu_tasks_trace.n_ipis_fails++; | ||
| 912 | per_cpu(trc_ipi_to_cpu, cpu) = false; | 915 | per_cpu(trc_ipi_to_cpu, cpu) = false; |
| 913 | t->trc_ipi_to_cpu = cpu; | 916 | t->trc_ipi_to_cpu = cpu; |
| 914 | if (atomic_dec_and_test(&trc_n_readers_need_end)) { | 917 | if (atomic_dec_and_test(&trc_n_readers_need_end)) { |