@@ -219,6 +219,16 @@ static void __init rcu_tasks_bootup_oddness(void)
219
219
220
220
#endif /* #ifndef CONFIG_TINY_RCU */
221
221
222
+ /* Dump out rcutorture-relevant state common to all RCU-tasks flavors. */
223
+ static void show_rcu_tasks_generic_gp_kthread (struct rcu_tasks * rtp , char * s )
224
+ {
225
+ pr_info ("%s %c%c %s\n" ,
226
+ rtp -> kname ,
227
+ ".k" [!!data_race (rtp -> kthread_ptr )],
228
+ ".C" [!!data_race (rtp -> cbs_head )],
229
+ s );
230
+ }
231
+
222
232
#ifdef CONFIG_TASKS_RCU
223
233
224
234
////////////////////////////////////////////////////////////////////////
@@ -482,7 +492,14 @@ static int __init rcu_spawn_tasks_kthread(void)
482
492
}
483
493
core_initcall (rcu_spawn_tasks_kthread );
484
494
485
- #endif /* #ifdef CONFIG_TASKS_RCU */
495
+ static void show_rcu_tasks_classic_gp_kthread (void )
496
+ {
497
+ show_rcu_tasks_generic_gp_kthread (& rcu_tasks , "" );
498
+ }
499
+
500
+ #else /* #ifdef CONFIG_TASKS_RCU */
501
+ static void show_rcu_tasks_classic_gp_kthread (void ) { }
502
+ #endif /* #else #ifdef CONFIG_TASKS_RCU */
486
503
487
504
#ifdef CONFIG_TASKS_RUDE_RCU
488
505
@@ -578,7 +595,14 @@ static int __init rcu_spawn_tasks_rude_kthread(void)
578
595
}
579
596
core_initcall (rcu_spawn_tasks_rude_kthread );
580
597
581
- #endif /* #ifdef CONFIG_TASKS_RUDE_RCU */
598
+ static void show_rcu_tasks_rude_gp_kthread (void )
599
+ {
600
+ show_rcu_tasks_generic_gp_kthread (& rcu_tasks_rude , "" );
601
+ }
602
+
603
+ #else /* #ifdef CONFIG_TASKS_RUDE_RCU */
604
+ static void show_rcu_tasks_rude_gp_kthread (void ) {}
605
+ #endif /* #else #ifdef CONFIG_TASKS_RUDE_RCU */
582
606
583
607
////////////////////////////////////////////////////////////////////////
584
608
//
@@ -982,10 +1006,27 @@ static int __init rcu_spawn_tasks_trace_kthread(void)
982
1006
}
983
1007
core_initcall (rcu_spawn_tasks_trace_kthread );
984
1008
1009
+ static void show_rcu_tasks_trace_gp_kthread (void )
1010
+ {
1011
+ char buf [32 ];
1012
+
1013
+ sprintf (buf , "N%d" , atomic_read (& trc_n_readers_need_end ));
1014
+ show_rcu_tasks_generic_gp_kthread (& rcu_tasks_trace , buf );
1015
+ }
1016
+
985
1017
#else /* #ifdef CONFIG_TASKS_TRACE_RCU */
986
1018
void exit_tasks_rcu_finish_trace (struct task_struct * t ) { }
1019
+ static inline void show_rcu_tasks_trace_gp_kthread (void ) {}
987
1020
#endif /* #else #ifdef CONFIG_TASKS_TRACE_RCU */
988
1021
1022
+ void show_rcu_tasks_gp_kthreads (void )
1023
+ {
1024
+ show_rcu_tasks_classic_gp_kthread ();
1025
+ show_rcu_tasks_rude_gp_kthread ();
1026
+ show_rcu_tasks_trace_gp_kthread ();
1027
+ }
1028
+
989
1029
#else /* #ifdef CONFIG_TASKS_RCU_GENERIC */
990
1030
static inline void rcu_tasks_bootup_oddness (void ) {}
1031
+ void show_rcu_tasks_gp_kthreads (void ) {}
991
1032
#endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
0 commit comments