sched: introduce SCHED_FEAT_SYNC_WAKEUPS, turn it off
authorIngo Molnar <mingo@elte.hu>
Sun, 16 Mar 2008 19:03:22 +0000 (20:03 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 19 Apr 2008 17:44:57 +0000 (19:44 +0200)
turn off sync wakeups by default. They are not needed anymore - the
buddy logic should be smart enough to keep the system from
overscheduling.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c

index d8456a9ac9af8f1c9ca9ef8747242d21f46a93d2..263e25e10204fe2b727db99e67fb8cf3d07d45ca 100644 (file)
@@ -627,6 +627,7 @@ enum {
        SCHED_FEAT_START_DEBIT          = 4,
        SCHED_FEAT_HRTICK               = 8,
        SCHED_FEAT_DOUBLE_TICK          = 16,
+       SCHED_FEAT_SYNC_WAKEUPS         = 32,
 };
 
 const_debug unsigned int sysctl_sched_features =
@@ -634,7 +635,8 @@ const_debug unsigned int sysctl_sched_features =
                SCHED_FEAT_WAKEUP_PREEMPT       * 1 |
                SCHED_FEAT_START_DEBIT          * 1 |
                SCHED_FEAT_HRTICK               * 1 |
-               SCHED_FEAT_DOUBLE_TICK          * 0;
+               SCHED_FEAT_DOUBLE_TICK          * 0 |
+               SCHED_FEAT_SYNC_WAKEUPS         * 0;
 
 #define sched_feat(x) (sysctl_sched_features & SCHED_FEAT_##x)
 
@@ -1916,6 +1918,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
        long old_state;
        struct rq *rq;
 
+       if (!sched_feat(SYNC_WAKEUPS))
+               sync = 0;
+
        smp_wmb();
        rq = task_rq_lock(p, &flags);
        old_state = p->state;