diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched_fair.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index a3badf52bba2..d558716a9add 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
| @@ -852,20 +852,21 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p) | |||
| 852 | if (unlikely(p->policy == SCHED_BATCH)) | 852 | if (unlikely(p->policy == SCHED_BATCH)) |
| 853 | return; | 853 | return; |
| 854 | 854 | ||
| 855 | if (sched_feat(WAKEUP_PREEMPT)) { | 855 | if (!sched_feat(WAKEUP_PREEMPT)) |
| 856 | while (!is_same_group(se, pse)) { | 856 | return; |
| 857 | se = parent_entity(se); | ||
| 858 | pse = parent_entity(pse); | ||
| 859 | } | ||
| 860 | |||
| 861 | delta = se->vruntime - pse->vruntime; | ||
| 862 | gran = sysctl_sched_wakeup_granularity; | ||
| 863 | if (unlikely(se->load.weight != NICE_0_LOAD)) | ||
| 864 | gran = calc_delta_fair(gran, &se->load); | ||
| 865 | 857 | ||
| 866 | if (delta > gran) | 858 | while (!is_same_group(se, pse)) { |
| 867 | resched_task(curr); | 859 | se = parent_entity(se); |
| 860 | pse = parent_entity(pse); | ||
| 868 | } | 861 | } |
| 862 | |||
| 863 | delta = se->vruntime - pse->vruntime; | ||
| 864 | gran = sysctl_sched_wakeup_granularity; | ||
| 865 | if (unlikely(se->load.weight != NICE_0_LOAD)) | ||
| 866 | gran = calc_delta_fair(gran, &se->load); | ||
| 867 | |||
| 868 | if (delta > gran) | ||
| 869 | resched_task(curr); | ||
| 869 | } | 870 | } |
| 870 | 871 | ||
| 871 | static struct task_struct *pick_next_task_fair(struct rq *rq) | 872 | static struct task_struct *pick_next_task_fair(struct rq *rq) |
