.busy_idx               = 2,                    \
        .idle_idx               = 1,                    \
        .newidle_idx            = 2,                    \
-       .wake_idx               = 1,                    \
+       .wake_idx               = 0,                    \
        .forkexec_idx           = 1,                    \
        .flags                  = SD_LOAD_BALANCE       \
                                | SD_BALANCE_NEWIDLE    \
                                | SD_BALANCE_EXEC       \
+                               | SD_BALANCE_FORK       \
                                | SD_BALANCE_WAKE       \
                                | SD_WAKE_AFFINE,       \
        .last_balance           = jiffies,              \
        .busy_idx               = 3,                    \
        .idle_idx               = 2,                    \
        .newidle_idx            = 2,                    \
-       .wake_idx               = 1,                    \
+       .wake_idx               = 0,                    \
        .forkexec_idx           = 1,                    \
        .flags                  = SD_LOAD_BALANCE       \
                                | SD_BALANCE_EXEC       \
 
        .busy_idx               = 3,                                    \
        .idle_idx               = SD_IDLE_IDX,                          \
        .newidle_idx            = SD_NEWIDLE_IDX,                       \
-       .wake_idx               = 1,                                    \
+       .wake_idx               = 0,                                    \
        .forkexec_idx           = SD_FORKEXEC_IDX,                      \
                                                                        \
        .flags                  = 1*SD_LOAD_BALANCE                     \
 
  * domain.
  */
 static struct sched_group *
-find_idlest_group(struct sched_domain *sd, struct task_struct *p, int this_cpu)
+find_idlest_group(struct sched_domain *sd, struct task_struct *p,
+                 int this_cpu, int flag)
 {
        struct sched_group *idlest = NULL, *this = NULL, *group = sd->groups;
        unsigned long min_load = ULONG_MAX, this_load = 0;
-       int load_idx = sd->forkexec_idx;
        int imbalance = 100 + (sd->imbalance_pct-100)/2;
+       int load_idx = 0;
+
+       switch (flag) {
+       case SD_BALANCE_FORK:
+       case SD_BALANCE_EXEC:
+               load_idx = sd->forkexec_idx;
+               break;
+
+       case SD_BALANCE_WAKE:
+               load_idx = sd->wake_idx;
+               break;
+
+       default:
+               break;
+       }
 
        do {
                unsigned long load, avg_load;
                        continue;
                }
 
-               group = find_idlest_group(sd, p, cpu);
+               group = find_idlest_group(sd, p, cpu, flag);
                if (!group) {
                        sd = sd->child;
                        continue;