Lines Matching refs:tsk

22 		   struct taskstats *stats, struct task_struct *tsk)  in bacct_add_tsk()  argument
32 delta = ktime_get_ns() - tsk->start_time; in bacct_add_tsk()
41 if (thread_group_leader(tsk)) { in bacct_add_tsk()
42 stats->ac_exitcode = tsk->exit_code; in bacct_add_tsk()
43 if (tsk->flags & PF_FORKNOEXEC) in bacct_add_tsk()
46 if (tsk->flags & PF_SUPERPRIV) in bacct_add_tsk()
48 if (tsk->flags & PF_DUMPCORE) in bacct_add_tsk()
50 if (tsk->flags & PF_SIGNALED) in bacct_add_tsk()
52 stats->ac_nice = task_nice(tsk); in bacct_add_tsk()
53 stats->ac_sched = tsk->policy; in bacct_add_tsk()
54 stats->ac_pid = task_pid_nr_ns(tsk, pid_ns); in bacct_add_tsk()
56 tcred = __task_cred(tsk); in bacct_add_tsk()
59 stats->ac_ppid = pid_alive(tsk) ? in bacct_add_tsk()
60 task_tgid_nr_ns(rcu_dereference(tsk->real_parent), pid_ns) : 0; in bacct_add_tsk()
63 task_cputime(tsk, &utime, &stime); in bacct_add_tsk()
67 task_cputime_scaled(tsk, &utimescaled, &stimescaled); in bacct_add_tsk()
71 stats->ac_minflt = tsk->min_flt; in bacct_add_tsk()
72 stats->ac_majflt = tsk->maj_flt; in bacct_add_tsk()
74 strncpy(stats->ac_comm, tsk->comm, sizeof(stats->ac_comm)); in bacct_add_tsk()
119 static void __acct_update_integrals(struct task_struct *tsk, in __acct_update_integrals() argument
124 if (!likely(tsk->mm)) in __acct_update_integrals()
128 delta = time - tsk->acct_timexpd; in __acct_update_integrals()
133 tsk->acct_timexpd = time; in __acct_update_integrals()
139 tsk->acct_rss_mem1 += delta * get_mm_rss(tsk->mm) >> 10; in __acct_update_integrals()
140 tsk->acct_vm_mem1 += delta * READ_ONCE(tsk->mm->total_vm) >> 10; in __acct_update_integrals()
147 void acct_update_integrals(struct task_struct *tsk) in acct_update_integrals() argument
153 task_cputime(tsk, &utime, &stime); in acct_update_integrals()
154 __acct_update_integrals(tsk, utime, stime); in acct_update_integrals()
162 void acct_account_cputime(struct task_struct *tsk) in acct_account_cputime() argument
164 __acct_update_integrals(tsk, tsk->utime, tsk->stime); in acct_account_cputime()
171 void acct_clear_integrals(struct task_struct *tsk) in acct_clear_integrals() argument
173 tsk->acct_timexpd = 0; in acct_clear_integrals()
174 tsk->acct_rss_mem1 = 0; in acct_clear_integrals()
175 tsk->acct_vm_mem1 = 0; in acct_clear_integrals()