aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index d8456a9ac9af..263e25e10204 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -627,6 +627,7 @@ enum {
627 SCHED_FEAT_START_DEBIT = 4, 627 SCHED_FEAT_START_DEBIT = 4,
628 SCHED_FEAT_HRTICK = 8, 628 SCHED_FEAT_HRTICK = 8,
629 SCHED_FEAT_DOUBLE_TICK = 16, 629 SCHED_FEAT_DOUBLE_TICK = 16,
630 SCHED_FEAT_SYNC_WAKEUPS = 32,
630}; 631};
631 632
632const_debug unsigned int sysctl_sched_features = 633const_debug unsigned int sysctl_sched_features =
@@ -634,7 +635,8 @@ const_debug unsigned int sysctl_sched_features =
634 SCHED_FEAT_WAKEUP_PREEMPT * 1 | 635 SCHED_FEAT_WAKEUP_PREEMPT * 1 |
635 SCHED_FEAT_START_DEBIT * 1 | 636 SCHED_FEAT_START_DEBIT * 1 |
636 SCHED_FEAT_HRTICK * 1 | 637 SCHED_FEAT_HRTICK * 1 |
637 SCHED_FEAT_DOUBLE_TICK * 0; 638 SCHED_FEAT_DOUBLE_TICK * 0 |
639 SCHED_FEAT_SYNC_WAKEUPS * 0;
638 640
639#define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x) 641#define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x)
640 642
@@ -1916,6 +1918,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
1916 long old_state; 1918 long old_state;
1917 struct rq *rq; 1919 struct rq *rq;
1918 1920
1921 if (!sched_feat(SYNC_WAKEUPS))
1922 sync = 0;
1923
1919 smp_wmb(); 1924 smp_wmb();
1920 rq = task_rq_lock(p, &flags); 1925 rq = task_rq_lock(p, &flags);
1921 old_state = p->state; 1926 old_state = p->state;