diff options
Diffstat (limited to 'kernel/sched/fair.c')
| -rw-r--r-- | kernel/sched/fair.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index cffeceec285c..4da8b618232e 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -83,7 +83,7 @@ unsigned int sysctl_sched_child_runs_first __read_mostly; /* * Controls whether, when SD_SHARE_PKG_RESOURCES is on, if all * tasks go to idle CPUs when woken. If this is off, note that the - * per-task flag PF_WAKE_ON_IDLE can still cause a task to go to an + * per-task flag PF_WAKE_UP_IDLE can still cause a task to go to an * idle CPU upon being woken. */ unsigned int __read_mostly sysctl_sched_wake_to_idle; @@ -2453,7 +2453,25 @@ static inline void update_cfs_shares(struct cfs_rq *cfs_rq) #endif /* CONFIG_FAIR_GROUP_SCHED */ #ifdef CONFIG_SMP -/* Precomputed fixed inverse multiplies for multiplication by y^n */ +u32 sched_get_wake_up_idle(struct task_struct *p) +{ + u32 enabled = p->flags & PF_WAKE_UP_IDLE; + + return !!enabled; +} + +int sched_set_wake_up_idle(struct task_struct *p, int wake_up_idle) +{ + int enable = !!wake_up_idle; + + if (enable) + p->flags |= PF_WAKE_UP_IDLE; + else + p->flags &= ~PF_WAKE_UP_IDLE; + + return 0; +} + static const u32 runnable_avg_yN_inv[] = { 0xffffffff, 0xfa83b2da, 0xf5257d14, 0xefe4b99a, 0xeac0c6e6, 0xe5b906e6, 0xe0ccdeeb, 0xdbfbb796, 0xd744fcc9, 0xd2a81d91, 0xce248c14, 0xc9b9bd85, |
