Lines Matching refs:p
53 static unsigned long sched_core_update_cookie(struct task_struct *p, in sched_core_update_cookie() argument
60 rq = task_rq_lock(p, &rf); in sched_core_update_cookie()
68 SCHED_WARN_ON((p->core_cookie || cookie) && !sched_core_enabled(rq)); in sched_core_update_cookie()
70 if (sched_core_enqueued(p)) in sched_core_update_cookie()
71 sched_core_dequeue(rq, p, DEQUEUE_SAVE); in sched_core_update_cookie()
73 old_cookie = p->core_cookie; in sched_core_update_cookie()
74 p->core_cookie = cookie; in sched_core_update_cookie()
79 if (cookie && task_on_rq_queued(p)) in sched_core_update_cookie()
80 sched_core_enqueue(rq, p); in sched_core_update_cookie()
91 if (task_on_cpu(rq, p)) in sched_core_update_cookie()
94 task_rq_unlock(rq, p, &rf); in sched_core_update_cookie()
99 static unsigned long sched_core_clone_cookie(struct task_struct *p) in sched_core_clone_cookie() argument
103 raw_spin_lock_irqsave(&p->pi_lock, flags); in sched_core_clone_cookie()
104 cookie = sched_core_get_cookie(p->core_cookie); in sched_core_clone_cookie()
105 raw_spin_unlock_irqrestore(&p->pi_lock, flags); in sched_core_clone_cookie()
110 void sched_core_fork(struct task_struct *p) in sched_core_fork() argument
112 RB_CLEAR_NODE(&p->core_node); in sched_core_fork()
113 p->core_cookie = sched_core_clone_cookie(current); in sched_core_fork()
116 void sched_core_free(struct task_struct *p) in sched_core_free() argument
118 sched_core_put_cookie(p->core_cookie); in sched_core_free()
121 static void __sched_core_set(struct task_struct *p, unsigned long cookie) in __sched_core_set() argument
124 cookie = sched_core_update_cookie(p, cookie); in __sched_core_set()
133 struct task_struct *task, *p; in sched_core_share_pid() local
218 do_each_pid_thread(grp, type, p) { in sched_core_share_pid()
219 if (!ptrace_may_access(p, PTRACE_MODE_READ_REALCREDS)) { in sched_core_share_pid()
223 } while_each_pid_thread(grp, type, p); in sched_core_share_pid()
225 do_each_pid_thread(grp, type, p) { in sched_core_share_pid()
226 __sched_core_set(p, cookie); in sched_core_share_pid()
227 } while_each_pid_thread(grp, type, p); in sched_core_share_pid()
245 struct task_struct *p; in __sched_core_account_forceidle() local
276 p = rq_i->core_pick ?: rq_i->curr; in __sched_core_account_forceidle()
278 if (p == rq_i->idle) in __sched_core_account_forceidle()
285 __account_forceidle_time(p, delta); in __sched_core_account_forceidle()