Lines Matching refs:policy
2864 p->policy = SCHED_NORMAL; in sched_fork()
4684 int policy = attr->sched_policy; in __setscheduler_params() local
4686 if (policy == SETPARAM_POLICY) in __setscheduler_params()
4687 policy = p->policy; in __setscheduler_params()
4689 p->policy = policy; in __setscheduler_params()
4691 if (dl_policy(policy)) in __setscheduler_params()
4693 else if (fair_policy(policy)) in __setscheduler_params()
4758 int new_effective_prio, policy = attr->sched_policy; in __sched_setscheduler() local
4769 if (policy < 0) { in __sched_setscheduler()
4771 policy = oldpolicy = p->policy; in __sched_setscheduler()
4775 if (!valid_policy(policy)) in __sched_setscheduler()
4790 if ((dl_policy(policy) && !__checkparam_dl(attr)) || in __sched_setscheduler()
4791 (rt_policy(policy) != (attr->sched_priority != 0))) in __sched_setscheduler()
4798 if (fair_policy(policy)) { in __sched_setscheduler()
4804 if (rt_policy(policy)) { in __sched_setscheduler()
4809 if (policy != p->policy && !rlim_rtprio) in __sched_setscheduler()
4824 if (dl_policy(policy)) in __sched_setscheduler()
4831 if (task_has_idle_policy(p) && !idle_policy(policy)) { in __sched_setscheduler()
4886 if (unlikely(policy == p->policy)) { in __sched_setscheduler()
4887 if (fair_policy(policy) && attr->sched_nice != task_nice(p)) in __sched_setscheduler()
4889 if (rt_policy(policy) && attr->sched_priority != p->rt_priority) in __sched_setscheduler()
4891 if (dl_policy(policy) && dl_param_changed(p, attr)) in __sched_setscheduler()
4908 if (rt_bandwidth_enabled() && rt_policy(policy) && in __sched_setscheduler()
4916 if (dl_bandwidth_enabled() && dl_policy(policy) && in __sched_setscheduler()
4935 if (unlikely(oldpolicy != -1 && oldpolicy != p->policy)) { in __sched_setscheduler()
4936 policy = oldpolicy = -1; in __sched_setscheduler()
4948 if ((dl_policy(policy) || dl_task(p)) && sched_dl_overflow(p, policy, attr)) { in __sched_setscheduler()
5018 static int _sched_setscheduler(struct task_struct *p, int policy, in _sched_setscheduler() argument
5022 .sched_policy = policy, in _sched_setscheduler()
5028 if ((policy != SETPARAM_POLICY) && (policy & SCHED_RESET_ON_FORK)) { in _sched_setscheduler()
5030 policy &= ~SCHED_RESET_ON_FORK; in _sched_setscheduler()
5031 attr.sched_policy = policy; in _sched_setscheduler()
5046 int sched_setscheduler(struct task_struct *p, int policy, in sched_setscheduler() argument
5049 return _sched_setscheduler(p, policy, param, true); in sched_setscheduler()
5077 int sched_setscheduler_nocheck(struct task_struct *p, int policy, in sched_setscheduler_nocheck() argument
5080 return _sched_setscheduler(p, policy, param, false); in sched_setscheduler_nocheck()
5085 do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) in do_sched_setscheduler() argument
5104 retval = sched_setscheduler(p, policy, &lparam); in do_sched_setscheduler()
5164 SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy, struct sched_param __user *, param) in SYSCALL_DEFINE3() argument
5166 if (policy < 0) in SYSCALL_DEFINE3()
5169 return do_sched_setscheduler(pid, policy, param); in SYSCALL_DEFINE3()
5245 retval = p->policy in SYSCALL_DEFINE1()
5362 kattr.sched_policy = p->policy; in SYSCALL_DEFINE4()
5803 SYSCALL_DEFINE1(sched_get_priority_max, int, policy) in SYSCALL_DEFINE1() argument
5807 switch (policy) { in SYSCALL_DEFINE1()
5830 SYSCALL_DEFINE1(sched_get_priority_min, int, policy) in SYSCALL_DEFINE1() argument
5834 switch (policy) { in SYSCALL_DEFINE1()