Revert 'sched: adaptive default skew_tick value'

Signed-off-by: johnnyaiai <johnnyaiai@tencent.com>
Reviewed-by: Alex Shi <alexsshi@tencent.com>
This commit is contained in:
johnnyaiai 2022-12-22 19:26:44 +08:00 committed by Jianping Liu
parent c30056cab7
commit b9837b4aca
1 changed files with 2 additions and 8 deletions

View File

@ -1306,12 +1306,7 @@ static enum hrtimer_restart tick_sched_timer(struct hrtimer *timer)
return HRTIMER_RESTART;
}
#ifdef CONFIG_ARM64
static int sched_skew_tick;
#else
/* value -1 means not set via cmdline */
static int sched_skew_tick = -1;
#endif
static int __init skew_tick(char *str)
{
@ -1328,7 +1323,6 @@ void tick_setup_sched_timer(void)
{
struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
ktime_t now = ktime_get();
int cpus = num_possible_cpus();
/*
* Emulate tick processing via per-CPU hrtimers:
@ -1340,9 +1334,9 @@ void tick_setup_sched_timer(void)
hrtimer_set_expires(&ts->sched_timer, tick_init_jiffy_update());
/* Offset the tick to avert jiffies_lock contention. */
if (sched_skew_tick > 0 || (sched_skew_tick < 0 && cpus > 16)) {
if (sched_skew_tick) {
u64 offset = ktime_to_ns(tick_period) >> 1;
do_div(offset, cpus);
do_div(offset, num_possible_cpus());
offset *= smp_processor_id();
hrtimer_add_expires_ns(&ts->sched_timer, offset);
}