Skip to content

Commit 1a56206

Browse files
Waiman-Longpaulmckrcu
authored andcommitted
clocksource: Reduce the default clocksource_watchdog() retries to 2
With the previous patch, there is an extra watchdog read in each retry. Now the total number of clocksource reads is increased to 4 per iteration. In order to avoid increasing the clock skew check overhead, the default maximum number of retries is reduced from 3 to 2 to maintain the same 12 clocksource reads in the worst case. Suggested-by: Paul E. McKenney <[email protected]> Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent c86ff8c commit 1a56206

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,8 @@
603603
clocksource.max_cswd_read_retries= [KNL]
604604
Number of clocksource_watchdog() retries due to
605605
external delays before the clock will be marked
606-
unstable. Defaults to three retries, that is,
607-
four attempts to read the clock under test.
606+
unstable. Defaults to two retries, that is,
607+
three attempts to read the clock under test.
608608

609609
clocksource.verify_n_cpus= [KNL]
610610
Limit the number of CPUs checked for clocksources

kernel/time/clocksource.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ void clocksource_mark_unstable(struct clocksource *cs)
199199
spin_unlock_irqrestore(&watchdog_lock, flags);
200200
}
201201

202-
ulong max_cswd_read_retries = 3;
202+
ulong max_cswd_read_retries = 2;
203203
module_param(max_cswd_read_retries, ulong, 0644);
204204
EXPORT_SYMBOL_GPL(max_cswd_read_retries);
205205
static int verify_n_cpus = 8;

0 commit comments

Comments
 (0)