Skip to content

Commit ba14500

Browse files
Frederic WeisbeckerKAGA-KOKO
authored andcommitted
timers/migration: Remove dead code handling idle CPU checking for remote timers
Idle migrators don't walk the whole tree in order to find out if there are timers to migrate because they recorded the next deadline to be verified within a single check in tmigr_requires_handle_remote(). Remove the related dead code and data. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://patch.msgid.link/20251024132536.39841-7-frederic@kernel.org
1 parent 93643b9 commit ba14500

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

kernel/time/timer_migration.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -504,11 +504,6 @@ static bool tmigr_check_lonely(struct tmigr_group *group)
504504
* @now: timer base monotonic
505505
* @check: is set if there is the need to handle remote timers;
506506
* required in tmigr_requires_handle_remote() only
507-
* @tmc_active: this flag indicates, whether the CPU which triggers
508-
* the hierarchy walk is !idle in the timer migration
509-
* hierarchy. When the CPU is idle and the whole hierarchy is
510-
* idle, only the first event of the top level has to be
511-
* considered.
512507
*/
513508
struct tmigr_walk {
514509
u64 nextexp;
@@ -519,7 +514,6 @@ struct tmigr_walk {
519514
unsigned long basej;
520515
u64 now;
521516
bool check;
522-
bool tmc_active;
523517
};
524518

525519
typedef bool (*up_f)(struct tmigr_group *, struct tmigr_group *, struct tmigr_walk *);
@@ -1119,15 +1113,6 @@ static bool tmigr_requires_handle_remote_up(struct tmigr_group *group,
11191113
*/
11201114
if (!tmigr_check_migrator(group, childmask))
11211115
return true;
1122-
1123-
/*
1124-
* When there is a parent group and the CPU which triggered the
1125-
* hierarchy walk is not active, proceed the walk to reach the top level
1126-
* group before reading the next_expiry value.
1127-
*/
1128-
if (group->parent && !data->tmc_active)
1129-
return false;
1130-
11311116
/*
11321117
* The lock is required on 32bit architectures to read the variable
11331118
* consistently with a concurrent writer. On 64bit the lock is not
@@ -1172,7 +1157,6 @@ bool tmigr_requires_handle_remote(void)
11721157
data.now = get_jiffies_update(&jif);
11731158
data.childmask = tmc->groupmask;
11741159
data.firstexp = KTIME_MAX;
1175-
data.tmc_active = !tmc->idle;
11761160
data.check = false;
11771161

11781162
/*

0 commit comments

Comments
 (0)