/kernel/sched/ |
D | core.c | 107 static inline int __task_prio(struct task_struct *p) in __task_prio() argument 109 if (p->sched_class == &stop_sched_class) /* trumps deadline */ in __task_prio() 112 if (rt_prio(p->prio)) /* includes deadline */ in __task_prio() 113 return p->prio; /* [-1, 99] */ in __task_prio() 115 if (p->sched_class == &idle_sched_class) in __task_prio() 173 const struct task_struct *p = __node_2_sc(node); in rb_sched_core_cmp() local 176 if (cookie < p->core_cookie) in rb_sched_core_cmp() 179 if (cookie > p->core_cookie) in rb_sched_core_cmp() 185 void sched_core_enqueue(struct rq *rq, struct task_struct *p) in sched_core_enqueue() argument 189 if (!p->core_cookie) in sched_core_enqueue() [all …]
|
D | deadline.c | 37 struct task_struct *p = dl_task_of(dl_se); in dl_rq_of_se() local 38 struct rq *rq = task_rq(p); in dl_rq_of_se() 235 static void dl_change_utilization(struct task_struct *p, u64 new_bw) in dl_change_utilization() argument 239 BUG_ON(p->dl.flags & SCHED_FLAG_SUGOV); in dl_change_utilization() 241 if (task_on_rq_queued(p)) in dl_change_utilization() 244 rq = task_rq(p); in dl_change_utilization() 245 if (p->dl.dl_non_contending) { in dl_change_utilization() 246 sub_running_bw(&p->dl, &rq->dl); in dl_change_utilization() 247 p->dl.dl_non_contending = 0; in dl_change_utilization() 255 if (hrtimer_try_to_cancel(&p->dl.inactive_timer) == 1) in dl_change_utilization() [all …]
|
D | core_sched.c | 56 unsigned long sched_core_update_cookie(struct task_struct *p, unsigned long cookie) in sched_core_update_cookie() argument 63 rq = task_rq_lock(p, &rf); in sched_core_update_cookie() 71 SCHED_WARN_ON((p->core_cookie || cookie) && !sched_core_enabled(rq)); in sched_core_update_cookie() 73 enqueued = sched_core_enqueued(p); in sched_core_update_cookie() 75 sched_core_dequeue(rq, p); in sched_core_update_cookie() 77 old_cookie = p->core_cookie; in sched_core_update_cookie() 78 p->core_cookie = cookie; in sched_core_update_cookie() 81 sched_core_enqueue(rq, p); in sched_core_update_cookie() 88 if (task_running(rq, p)) in sched_core_update_cookie() 91 task_rq_unlock(rq, p, &rf); in sched_core_update_cookie() [all …]
|
D | fair.c | 726 static int select_idle_sibling(struct task_struct *p, int prev_cpu, int cpu); 727 static unsigned long task_h_load(struct task_struct *p); 777 void post_init_entity_util_avg(struct task_struct *p) in post_init_entity_util_avg() argument 779 struct sched_entity *se = &p->se; in post_init_entity_util_avg() 799 if (p->sched_class != &fair_sched_class) { in post_init_entity_util_avg() 823 void post_init_entity_util_avg(struct task_struct *p) in post_init_entity_util_avg() argument 895 struct task_struct *p; in update_stats_wait_end() local 913 p = task_of(se); in update_stats_wait_end() 914 if (task_on_rq_migrating(p)) { in update_stats_wait_end() 923 trace_sched_stat_wait(p, delta); in update_stats_wait_end() [all …]
|
D | rt.c | 252 struct task_struct *p = rt_task_of(rt_se); in rq_of_rt_se() local 254 return task_rq(p); in rq_of_rt_se() 333 struct task_struct *p; in inc_rt_migration() local 338 p = rt_task_of(rt_se); in inc_rt_migration() 342 if (p->nr_cpus_allowed > 1) in inc_rt_migration() 350 struct task_struct *p; in dec_rt_migration() local 355 p = rt_task_of(rt_se); in dec_rt_migration() 359 if (p->nr_cpus_allowed > 1) in dec_rt_migration() 389 static void enqueue_pushable_task(struct rq *rq, struct task_struct *p) in enqueue_pushable_task() argument 391 plist_del(&p->pushable_tasks, &rq->rt.pushable_tasks); in enqueue_pushable_task() [all …]
|
D | stats.h | 65 static inline void psi_enqueue(struct task_struct *p, bool wakeup) in psi_enqueue() argument 72 if (p->in_memstall) in psi_enqueue() 75 if (!wakeup || p->sched_psi_wake_requeue) { in psi_enqueue() 76 if (p->in_memstall) in psi_enqueue() 78 if (p->sched_psi_wake_requeue) in psi_enqueue() 79 p->sched_psi_wake_requeue = 0; in psi_enqueue() 81 if (p->in_iowait) in psi_enqueue() 85 psi_task_change(p, clear, set); in psi_enqueue() 88 static inline void psi_dequeue(struct task_struct *p, bool sleep) in psi_dequeue() argument 104 if (p->in_memstall) in psi_dequeue() [all …]
|
D | autogroup.c | 49 static inline struct autogroup *autogroup_task_get(struct task_struct *p) in autogroup_task_get() argument 54 if (!lock_task_sighand(p, &flags)) in autogroup_task_get() 57 ag = autogroup_kref_get(p->signal->autogroup); in autogroup_task_get() 58 unlock_task_sighand(p, &flags); in autogroup_task_get() 107 bool task_wants_autogroup(struct task_struct *p, struct task_group *tg) in task_wants_autogroup() argument 119 if (p->flags & PF_EXITING) in task_wants_autogroup() 125 void sched_autogroup_exit_task(struct task_struct *p) in sched_autogroup_exit_task() argument 132 sched_move_task(p); in sched_autogroup_exit_task() 136 autogroup_move_group(struct task_struct *p, struct autogroup *ag) in autogroup_move_group() argument 142 BUG_ON(!lock_task_sighand(p, &flags)); in autogroup_move_group() [all …]
|
D | cputime.c | 113 static inline void task_group_account_field(struct task_struct *p, int index, in task_group_account_field() argument 124 cgroup_account_cputime_field(p, index, tmp); in task_group_account_field() 132 void account_user_time(struct task_struct *p, u64 cputime) in account_user_time() argument 137 p->utime += cputime; in account_user_time() 138 account_group_user_time(p, cputime); in account_user_time() 140 index = (task_nice(p) > 0) ? CPUTIME_NICE : CPUTIME_USER; in account_user_time() 143 task_group_account_field(p, index, cputime); in account_user_time() 146 acct_account_cputime(p); in account_user_time() 149 cpufreq_acct_update_power(p, cputime); in account_user_time() 157 void account_guest_time(struct task_struct *p, u64 cputime) in account_guest_time() argument [all …]
|
D | sched.h | 188 static inline int task_has_idle_policy(struct task_struct *p) in task_has_idle_policy() argument 190 return idle_policy(p->policy); in task_has_idle_policy() 193 static inline int task_has_rt_policy(struct task_struct *p) in task_has_rt_policy() argument 195 return rt_policy(p->policy); in task_has_rt_policy() 198 static inline int task_has_dl_policy(struct task_struct *p) in task_has_dl_policy() argument 200 return dl_policy(p->policy); in task_has_dl_policy() 270 void __dl_clear_params(struct task_struct *p); 338 static inline bool dl_task_fits_capacity(struct task_struct *p, int cpu) in dl_task_fits_capacity() argument 342 return cap_scale(p->dl.dl_deadline, cap) >= p->dl.dl_runtime; in dl_task_fits_capacity() 348 extern int sched_dl_overflow(struct task_struct *p, int policy, const struct sched_attr *attr); [all …]
|
D | debug.c | 527 print_task(struct seq_file *m, struct rq *rq, struct task_struct *p) in print_task() argument 529 if (task_current(rq, p)) in print_task() 532 SEQ_printf(m, " %c", task_state_to_char(p)); in print_task() 535 p->comm, task_pid_nr(p), in print_task() 536 SPLIT_NS(p->se.vruntime), in print_task() 537 (long long)(p->nvcsw + p->nivcsw), in print_task() 538 p->prio); in print_task() 541 SPLIT_NS(schedstat_val_or_zero(p->se.statistics.wait_sum)), in print_task() 542 SPLIT_NS(p->se.sum_exec_runtime), in print_task() 543 SPLIT_NS(schedstat_val_or_zero(p->se.statistics.sum_sleep_runtime))); in print_task() [all …]
|
D | membarrier.c | 268 struct task_struct *p; in membarrier_global_expedited() local 289 p = rcu_dereference(cpu_rq(cpu)->curr); in membarrier_global_expedited() 290 if (!p->mm) in membarrier_global_expedited() 359 struct task_struct *p; in membarrier_private_expedited() local 364 p = rcu_dereference(cpu_rq(cpu_id)->curr); in membarrier_private_expedited() 365 if (!p || p->mm != mm) { in membarrier_private_expedited() 375 struct task_struct *p; in membarrier_private_expedited() local 377 p = rcu_dereference(cpu_rq(cpu)->curr); in membarrier_private_expedited() 378 if (p && p->mm == mm) in membarrier_private_expedited() 475 struct task_struct *p; in sync_runqueues_membarrier_state() local [all …]
|
D | stop_task.c | 14 select_task_rq_stop(struct task_struct *p, int cpu, int flags) in select_task_rq_stop() argument 16 return task_cpu(p); /* stop tasks as never migrate */ in select_task_rq_stop() 27 check_preempt_curr_stop(struct rq *rq, struct task_struct *p, int flags) in check_preempt_curr_stop() argument 47 struct task_struct *p = pick_task_stop(rq); in pick_next_task_stop() local 49 if (p) in pick_next_task_stop() 50 set_next_task_stop(rq, p, true); in pick_next_task_stop() 52 return p; in pick_next_task_stop() 56 enqueue_task_stop(struct rq *rq, struct task_struct *p, int flags) in enqueue_task_stop() argument 62 dequeue_task_stop(struct rq *rq, struct task_struct *p, int flags) in dequeue_task_stop() argument 103 static void switched_to_stop(struct rq *rq, struct task_struct *p) in switched_to_stop() argument [all …]
|
/kernel/trace/ |
D | trace_boot.c | 28 const char *p; in trace_boot_set_instance_options() local 33 xbc_node_for_each_array_value(node, "options", anode, p) { in trace_boot_set_instance_options() 34 if (strlcpy(buf, p, ARRAY_SIZE(buf)) >= ARRAY_SIZE(buf)) { in trace_boot_set_instance_options() 35 pr_err("String is too long: %s\n", p); in trace_boot_set_instance_options() 43 p = xbc_node_find_value(node, "tracing_on", NULL); in trace_boot_set_instance_options() 44 if (p && *p != '\0') { in trace_boot_set_instance_options() 45 if (kstrtoul(p, 10, &v)) in trace_boot_set_instance_options() 46 pr_err("Failed to set tracing on: %s\n", p); in trace_boot_set_instance_options() 53 p = xbc_node_find_value(node, "trace_clock", NULL); in trace_boot_set_instance_options() 54 if (p && *p != '\0') { in trace_boot_set_instance_options() [all …]
|
D | trace_branch.c | 41 const char *p; in probe_likely_condition() local 72 p = f->data.file + strlen(f->data.file); in probe_likely_condition() 73 while (p >= f->data.file && *p != '/') in probe_likely_condition() 74 p--; in probe_likely_condition() 75 p++; in probe_likely_condition() 78 strncpy(entry->file, p, TRACE_FILE_SIZE); in probe_likely_condition() 247 static inline long get_incorrect_percent(const struct ftrace_branch_data *p) in get_incorrect_percent() argument 251 if (p->correct) { in get_incorrect_percent() 252 percent = p->incorrect * 100; in get_incorrect_percent() 253 percent /= p->correct + p->incorrect; in get_incorrect_percent() [all …]
|
D | trace_output.c | 65 trace_print_flags_seq(struct trace_seq *p, const char *delim, in trace_print_flags_seq() argument 71 const char *ret = trace_seq_buffer_ptr(p); in trace_print_flags_seq() 83 trace_seq_puts(p, delim); in trace_print_flags_seq() 86 trace_seq_puts(p, str); in trace_print_flags_seq() 92 trace_seq_puts(p, delim); in trace_print_flags_seq() 93 trace_seq_printf(p, "0x%lx", flags); in trace_print_flags_seq() 96 trace_seq_putc(p, 0); in trace_print_flags_seq() 103 trace_print_symbols_seq(struct trace_seq *p, unsigned long val, in trace_print_symbols_seq() argument 107 const char *ret = trace_seq_buffer_ptr(p); in trace_print_symbols_seq() 114 trace_seq_puts(p, symbol_array[i].name); in trace_print_symbols_seq() [all …]
|
/kernel/ |
D | kprobes.c | 371 struct kprobe *p; in get_kprobe() local 374 hlist_for_each_entry_rcu(p, head, hlist, in get_kprobe() 376 if (p->addr == addr) in get_kprobe() 377 return p; in get_kprobe() 384 static int aggr_pre_handler(struct kprobe *p, struct pt_regs *regs); 387 static inline int kprobe_aggrprobe(struct kprobe *p) in kprobe_aggrprobe() argument 389 return p->pre_handler == aggr_pre_handler; in kprobe_aggrprobe() 393 static inline int kprobe_unused(struct kprobe *p) in kprobe_unused() argument 395 return kprobe_aggrprobe(p) && kprobe_disabled(p) && in kprobe_unused() 396 list_empty(&p->list); in kprobe_unused() [all …]
|
D | exit.c | 121 static void __unhash_process(struct task_struct *p, bool group_dead) in __unhash_process() argument 124 detach_pid(p, PIDTYPE_PID); in __unhash_process() 126 detach_pid(p, PIDTYPE_TGID); in __unhash_process() 127 detach_pid(p, PIDTYPE_PGID); in __unhash_process() 128 detach_pid(p, PIDTYPE_SID); in __unhash_process() 130 list_del_rcu(&p->tasks); in __unhash_process() 131 list_del_init(&p->sibling); in __unhash_process() 134 list_del_rcu(&p->thread_group); in __unhash_process() 135 list_del_rcu(&p->thread_node); in __unhash_process() 231 void release_task(struct task_struct *p) in release_task() argument [all …]
|
D | fork.c | 1069 struct task_struct *p) in mm_clear_owner() argument 1072 if (mm->owner == p) in mm_clear_owner() 1077 static void mm_init_owner(struct mm_struct *mm, struct task_struct *p) in mm_init_owner() argument 1080 mm->owner = p; in mm_init_owner() 1098 static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p, in mm_init() argument 1119 mm_init_owner(mm, p); in mm_init() 1142 if (init_new_context(p, mm)) in mm_init() 1756 static void copy_seccomp(struct task_struct *p) in copy_seccomp() argument 1769 p->seccomp = current->seccomp; in copy_seccomp() 1777 task_set_no_new_privs(p); in copy_seccomp() [all …]
|
D | freezer.c | 38 bool freezing_slow_path(struct task_struct *p) in freezing_slow_path() argument 40 if (p->flags & (PF_NOFREEZE | PF_SUSPEND_TASK)) in freezing_slow_path() 43 if (test_tsk_thread_flag(p, TIF_MEMDIE)) in freezing_slow_path() 46 if (pm_nosig_freezing || cgroup_freezing(p)) in freezing_slow_path() 49 if (pm_freezing && !(p->flags & PF_KTHREAD)) in freezing_slow_path() 99 static void fake_signal_wake_up(struct task_struct *p) in fake_signal_wake_up() argument 103 if (lock_task_sighand(p, &flags)) { in fake_signal_wake_up() 104 signal_wake_up(p, 0); in fake_signal_wake_up() 105 unlock_task_sighand(p, &flags); in fake_signal_wake_up() 120 bool freeze_task(struct task_struct *p) in freeze_task() argument [all …]
|
D | resource.c | 59 static struct resource *next_resource(struct resource *p) in next_resource() argument 61 if (p->child) in next_resource() 62 return p->child; in next_resource() 63 while (!p->sibling && p->parent) in next_resource() 64 p = p->parent; in next_resource() 65 return p->sibling; in next_resource() 70 struct resource *p = v; in r_next() local 72 return (void *)next_resource(p); in r_next() 82 struct resource *p = PDE_DATA(file_inode(m->file)); in r_start() local 85 for (p = p->child; p && l < *pos; p = r_next(m, p, &l)) in r_start() [all …]
|
D | sys.c | 166 static bool set_one_prio_perm(struct task_struct *p) in set_one_prio_perm() argument 168 const struct cred *cred = current_cred(), *pcred = __task_cred(p); in set_one_prio_perm() 182 static int set_one_prio(struct task_struct *p, int niceval, int error) in set_one_prio() argument 186 if (!set_one_prio_perm(p)) { in set_one_prio() 190 if (niceval < task_nice(p) && !can_nice(p, niceval)) { in set_one_prio() 194 no_nice = security_task_setnice(p, niceval); in set_one_prio() 201 set_user_nice(p, niceval); in set_one_prio() 208 struct task_struct *g, *p; in SYSCALL_DEFINE3() local 230 p = find_task_by_vpid(who); in SYSCALL_DEFINE3() 232 p = current; in SYSCALL_DEFINE3() [all …]
|
/kernel/debug/kdb/ |
D | kdb_bt.c | 22 static void kdb_show_stack(struct task_struct *p, void *addr) in kdb_show_stack() argument 26 if (!addr && kdb_task_has_cpu(p)) { in kdb_show_stack() 30 kdb_dump_stack_on_cpu(kdb_process_cpu(p)); in kdb_show_stack() 33 show_stack(p, addr, KERN_EMERG); in kdb_show_stack() 77 kdb_bt1(struct task_struct *p, const char *mask, bool btaprompt) in kdb_bt1() argument 81 if (kdb_getarea(ch, (unsigned long)p) || in kdb_bt1() 82 kdb_getarea(ch, (unsigned long)(p+1)-1)) in kdb_bt1() 84 if (!kdb_task_state(p, mask)) in kdb_bt1() 86 kdb_printf("Stack traceback for pid %d\n", p->pid); in kdb_bt1() 87 kdb_ps1(p); in kdb_bt1() [all …]
|
/kernel/power/ |
D | process.c | 35 struct task_struct *g, *p; in try_to_freeze_tasks() local 55 for_each_process_thread(g, p) { in try_to_freeze_tasks() 56 if (p == current || !freeze_task(p)) in try_to_freeze_tasks() 59 if (!freezer_should_skip(p)) in try_to_freeze_tasks() 108 for_each_process_thread(g, p) { in try_to_freeze_tasks() 109 if (p != current && !freezer_should_skip(p) in try_to_freeze_tasks() 110 && freezing(p) && !frozen(p)) { in try_to_freeze_tasks() 111 sched_show_task(p); in try_to_freeze_tasks() 112 trace_android_vh_try_to_freeze_todo_unfrozen(p); in try_to_freeze_tasks() 202 struct task_struct *g, *p; in thaw_processes() local [all …]
|
/kernel/cgroup/ |
D | pids.c | 112 struct pids_cgroup *p; in pids_uncharge() local 114 for (p = pids; parent_pids(p); p = parent_pids(p)) in pids_uncharge() 115 pids_cancel(p, num); in pids_uncharge() 129 struct pids_cgroup *p; in pids_charge() local 131 for (p = pids; parent_pids(p); p = parent_pids(p)) in pids_charge() 132 atomic64_add(num, &p->counter); in pids_charge() 146 struct pids_cgroup *p, *q; in pids_try_charge() local 148 for (p = pids; parent_pids(p); p = parent_pids(p)) { in pids_try_charge() 149 int64_t new = atomic64_add_return(num, &p->counter); in pids_try_charge() 150 int64_t limit = atomic64_read(&p->limit); in pids_try_charge() [all …]
|
/kernel/time/ |
D | posix-cpu-timers.c | 187 static u64 cpu_clock_sample(const clockid_t clkid, struct task_struct *p) in cpu_clock_sample() argument 192 return task_sched_runtime(p); in cpu_clock_sample() 194 task_cputime(p, &utime, &stime); in cpu_clock_sample() 214 static void task_sample_cputime(struct task_struct *p, u64 *samples) in task_sample_cputime() argument 218 task_cputime(p, &utime, &stime); in task_sample_cputime() 219 store_samples(samples, stime, utime, p->se.sum_exec_runtime); in task_sample_cputime() 333 static u64 cpu_clock_sample_group(const clockid_t clkid, struct task_struct *p, in cpu_clock_sample_group() argument 336 struct thread_group_cputimer *cputimer = &p->signal->cputimer; in cpu_clock_sample_group() 337 struct posix_cputimers *pct = &p->signal->posix_cputimers; in cpu_clock_sample_group() 342 thread_group_start_cputime(p, samples); in cpu_clock_sample_group() [all …]
|