Merge "sched: turn off the TTWU_QUEUE feature"

This commit is contained in:
qctecmdr 2019-12-10 17:17:59 -08:00 • committed by Gerrit - the friendly Code Review server
commit d040484f53
5 changed files with 25 additions and 3 deletions

View file

@ -3864,6 +3864,9 @@ static noinline void __schedule_bug(struct task_struct *prev)
if (panic_on_warn)
panic("scheduling while atomic\n");
#ifdef CONFIG_PANIC_ON_SCHED_BUG
BUG();
#endif
dump_stack();
add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
}
@ -6787,6 +6790,9 @@ void ___might_sleep(const char *file, int line, int preempt_offset)
print_ip_sym(preempt_disable_ip);
pr_cont("\n");
}
#ifdef CONFIG_PANIC_ON_SCHED_BUG
BUG();
#endif
dump_stack();
add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
}

View file

@ -49,7 +49,7 @@ SCHED_FEAT(NONTASK_CAPACITY, true)
* Queue remote wakeups on the target CPU and process them
* using the scheduler IPI. Reduces rq->lock contention/bounces.
*/
SCHED_FEAT(TTWU_QUEUE, true)
SCHED_FEAT(TTWU_QUEUE, false)
/*
* When doing wakeups, attempt to limit superfluous scans of the LLC domain.

View file

@ -1452,8 +1452,8 @@ bool hrtimer_active(const struct hrtimer *timer)
base = READ_ONCE(timer->base);
seq = raw_read_seqcount_begin(&base->seq);
if (timer->state != HRTIMER_STATE_INACTIVE ||
base->running == timer)
if (((timer->state & ~HRTIMER_STATE_PINNED) !=
HRTIMER_STATE_INACTIVE) || base->running == timer)
return true;
} while (read_seqcount_retry(&base->seq, seq) ||

View file

@ -2057,6 +2057,13 @@ int timers_dead_cpu(unsigned int cpu)
return 0;
}
#ifdef CONFIG_CPUSETS
void timer_quiesce_cpu(void *cpup)
{
__migrate_timers(*(unsigned int *)cpup, false);
}
#endif /* CONFIG_CPUSETS */
#endif /* CONFIG_HOTPLUG_CPU */
static void __init init_timer_cpu(int cpu)

View file

@ -1022,6 +1022,15 @@ config SCHED_INFO
bool
default n
config PANIC_ON_SCHED_BUG
bool "Panic on all bugs encountered by the scheduler"
help
Say Y here to panic on all 'BUG:' conditions encountered by the
scheduler, even potentially-recoverable ones such as scheduling
while atomic and sleeping from invalid context etc.
Say N if unsure.
config SCHEDSTATS
bool "Collect scheduler statistics"
depends on DEBUG_KERNEL && PROC_FS