Skip to content

Commit 674fc92

Browse files
paulmckrcuNeeraj Upadhyay
authored andcommitted
rcuscale: Print detailed grace-period and barrier diagnostics
This commit uses the new rcu_tasks_torture_stats_print(), rcu_tasks_trace_torture_stats_print(), and rcu_tasks_rude_torture_stats_print() functions in order to provide detailed diagnostics on grace-period, callback, and barrier state when rcu_scale_writer() hangs. [ paulmck: Apply kernel test robot feedback. ] Signed-off-by: "Paul E. McKenney" <[email protected]> Signed-off-by: Neeraj Upadhyay <[email protected]>
1 parent 0616f7e commit 674fc92

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

kernel/rcu/rcuscale.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ static void tasks_scale_read_unlock(int idx)
298298
{
299299
}
300300

301+
static void rcu_tasks_scale_stats(void)
302+
{
303+
rcu_tasks_torture_stats_print(scale_type, SCALE_FLAG);
304+
}
305+
301306
static struct rcu_scale_ops tasks_ops = {
302307
.ptype = RCU_TASKS_FLAVOR,
303308
.init = rcu_sync_scale_init,
@@ -310,6 +315,7 @@ static struct rcu_scale_ops tasks_ops = {
310315
.sync = synchronize_rcu_tasks,
311316
.exp_sync = synchronize_rcu_tasks,
312317
.rso_gp_kthread = get_rcu_tasks_gp_kthread,
318+
.stats = IS_ENABLED(CONFIG_TINY_RCU) ? NULL : rcu_tasks_scale_stats,
313319
.name = "tasks"
314320
};
315321

@@ -336,6 +342,11 @@ static void tasks_rude_scale_read_unlock(int idx)
336342
{
337343
}
338344

345+
static void rcu_tasks_rude_scale_stats(void)
346+
{
347+
rcu_tasks_rude_torture_stats_print(scale_type, SCALE_FLAG);
348+
}
349+
339350
static struct rcu_scale_ops tasks_rude_ops = {
340351
.ptype = RCU_TASKS_RUDE_FLAVOR,
341352
.init = rcu_sync_scale_init,
@@ -346,6 +357,7 @@ static struct rcu_scale_ops tasks_rude_ops = {
346357
.sync = synchronize_rcu_tasks_rude,
347358
.exp_sync = synchronize_rcu_tasks_rude,
348359
.rso_gp_kthread = get_rcu_tasks_rude_gp_kthread,
360+
.stats = IS_ENABLED(CONFIG_TINY_RCU) ? NULL : rcu_tasks_rude_scale_stats,
349361
.name = "tasks-rude"
350362
};
351363

@@ -374,6 +386,11 @@ static void tasks_trace_scale_read_unlock(int idx)
374386
rcu_read_unlock_trace();
375387
}
376388

389+
static void rcu_tasks_trace_scale_stats(void)
390+
{
391+
rcu_tasks_trace_torture_stats_print(scale_type, SCALE_FLAG);
392+
}
393+
377394
static struct rcu_scale_ops tasks_tracing_ops = {
378395
.ptype = RCU_TASKS_FLAVOR,
379396
.init = rcu_sync_scale_init,
@@ -386,6 +403,7 @@ static struct rcu_scale_ops tasks_tracing_ops = {
386403
.sync = synchronize_rcu_tasks_trace,
387404
.exp_sync = synchronize_rcu_tasks_trace,
388405
.rso_gp_kthread = get_rcu_tasks_trace_gp_kthread,
406+
.stats = IS_ENABLED(CONFIG_TINY_RCU) ? NULL : rcu_tasks_trace_scale_stats,
389407
.name = "tasks-tracing"
390408
};
391409

0 commit comments

Comments
 (0)