Skip to content

Commit 9250674

Browse files
anna-marialxKAGA-KOKO
authored andcommitted
timers/migration: Improve tracing
Trace points of inactive and active propagation are located at the end of the related functions. The interesting information of those trace points is the updated group state. When trace points are not located directly at the place where group state changed, order of trace points in traces could be confusing. Move inactive and active propagation trace points directly after update of group state values. Signed-off-by: Anna-Maria Behnsen <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Frederic Weisbecker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 10a0e6f commit 9250674

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

kernel/time/timer_migration.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,8 @@ static bool tmigr_active_up(struct tmigr_group *group,
656656

657657
} while (!atomic_try_cmpxchg(&group->migr_state, &curstate.state, newstate.state));
658658

659+
trace_tmigr_group_set_cpu_active(group, newstate, childmask);
660+
659661
if (walk_done == false)
660662
data->childmask = group->childmask;
661663

@@ -673,8 +675,6 @@ static bool tmigr_active_up(struct tmigr_group *group,
673675
*/
674676
group->groupevt.ignore = true;
675677

676-
trace_tmigr_group_set_cpu_active(group, newstate, childmask);
677-
678678
return walk_done;
679679
}
680680

@@ -1306,9 +1306,10 @@ static bool tmigr_inactive_up(struct tmigr_group *group,
13061306

13071307
WARN_ON_ONCE((newstate.migrator != TMIGR_NONE) && !(newstate.active));
13081308

1309-
if (atomic_try_cmpxchg(&group->migr_state, &curstate.state,
1310-
newstate.state))
1309+
if (atomic_try_cmpxchg(&group->migr_state, &curstate.state, newstate.state)) {
1310+
trace_tmigr_group_set_cpu_inactive(group, newstate, childmask);
13111311
break;
1312+
}
13121313

13131314
/*
13141315
* The memory barrier is paired with the cmpxchg() in
@@ -1327,8 +1328,6 @@ static bool tmigr_inactive_up(struct tmigr_group *group,
13271328
if (walk_done == false)
13281329
data->childmask = group->childmask;
13291330

1330-
trace_tmigr_group_set_cpu_inactive(group, newstate, childmask);
1331-
13321331
return walk_done;
13331332
}
13341333

0 commit comments

Comments
 (0)